updateExisting method: createComposition
Implemented changes:
…
Processing
Validation before createComposition task
Prechecks - Initial checks of request input data
Encounter Processing - Receiving and processing medical records (Encounter)
Employee Processing - Receiving and processing Employee record (Composition.author)
Division Processing - Receiving and processing Division record (Employee Division)
Legal Entity Processing - Receiving and processing Legal Entity record (Employee Legal Entity)
Subject Processing - Receiving and processing Subject record
Focus Processing - Receiving and processing Focus record
Generate title:
Use prefix from configuration instead of first 4 symbols: {{composition_type}}
_TITLE_PREFIX
(ex.NEWBORN_TITLE_PREFIX
).If prefix can't be get from chart-parameters: Return 500 error (
"1071: Unexpected internal server error"
)
Check that there is no Composition in
mc.composition
with such titlein case it exists - return 1065 TITLE_GENERATION_FAILED
getSmsPhoneNumber - Receiving phone number for sending SMS about creation of composition
Saving the record of the Сomposition into database
Task status updating in DONE