ЕСОЗ - публічна документація
RC_Create full medication registry (EPRX-921)
Create full medication registry source link
…
Service logic
Validate input according to schema
Create job with type
create_medication_registry
For each line of input file create separate task of job
Each task must validate existing and create new entities of medications registry:
…
…
Extract and search connected program medication by:
In caseregistry_number = NULL
then search bymedication_id
(withtype = BRAND
) andprogram_medications.medical_program_id
andprogram_medication.registry_number IS NULL
;
In caseregistry_number
hasid
then search bymedication_id
(withtype = BRAND
) andprogram_medications.medical_program_id
andprogram_medication.registry_number
;in case more than one program medication with such params is found - return
FAILED
task status with error ('More than one PROGRAM_MEDICATION with such fields exist in program_medications table
')in case program medication is not found - insert program medication with brand according to Create full medication registry | program_medication
in case program medication is found - return
FAILED
task status with error ('Such medication already exist
')
Return job identifier with result.
…
ЕСОЗ - публічна документація