Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

updateExisting method: createComposition

Implemented changes:

Processing

  1. Validation before createComposition task

  2. Prechecks - Initial checks of request input data

  3. Encounter Processing - Receiving and processing medical records (Encounter)

  4. Employee Processing - Receiving and processing Employee record (Composition.author)

  5. Division Processing - Receiving and processing Division record (Employee Division)

  6. Legal Entity Processing - Receiving and processing Legal Entity record (Employee Legal Entity)

  7. Subject Processing - Receiving and processing Subject record

  8. Focus Processing - Receiving and processing Focus record

  9. Generate title:

    1. Use prefix from configuration instead of first 4 symbols: {{composition_type}}_TITLE_PREFIX (ex. NEWBORN_TITLE_PREFIX).

      1. If prefix can't be get from chart-parameters: Return 500 error ("1071: Unexpected internal server error")

    2. Check that there is no Composition in mc.composition with such title

      1. in case it exists - return 1065 TITLE_GENERATION_FAILED

  10. getSmsPhoneNumber - Receiving phone number for sending SMS about creation of composition

  11. Saving the record of the Сomposition into database

  12. Task status updating in DONE