ЕСОЗ - публічна документація
RCC_CSI-2483_createComposition
Existing method: createComposition
Implemented changes:
…
Validation data request
Focus Processing - Receiving and processing Focus record
For Newborn Composition:
If focus.type.coding.code isn’t person - return BAD_FOCUS_CODING(1009)
Getting a record about the Composition's patient by id with RPC method get_preperson_by_id if focus.type.coding.code = preperson or get_person_by_id if focus.type.coding.code = person and Composition.type is Temporary Disability
In case of error - return 1009 (BAD_FOCUS_CODING), 1010 (FOCUS_NOT_FOUND), 1111 (FOCUS_IS_NOT_ACTIVE)
Getting a record about the Composition.focus’s authorization methods by id with RPC method get_auth_methods.
If authorization method is expired such method isn't not used
If specified authorization method wasn't found - return 1171 (FOCUS_AUTH_NOT_SPECIFIED)
Checks for “section.focus” attribute:
If focus.type.code does not match with value in EMAL_VALIDATION_FOCUS_CATEGORIES_BY_TYPE - return 1201 (INVALID_DISABILITY_FOCUS_CATEGORY)
If focus.status does not match with value in EMAL_VALIDATION_FOCUS_ALLOWED_STATUSES_BY_CATEGORY - return 1202 (INVALID_DISABILITY_FOCUS_STATUS) or 1203 (INVALID_NEWBORN_FOCUS_STATUS )
If focus.type=preperson and IS_FOREIGN_TREATMENT extension is TRUE - return 1214 (FOREIGN_TREATMENT_FOR_FOCUS_PREPERSON_NOT_ALLOWED)
Additional checks for focus.type=person:
Check for patient’s verification_status:
If verification_status does not match with value in EMAL_VALIDATION_FOCUS_ALLOWED_VERIFICATION_STATUSES_BY_CATEGORY or it doesn't specified - return 1204 (INVALID_NEWBORN_FOCUS_VERIFICATION_STATUS) or 1205 (INVALID_DISABILITY_FOCUS_VERIFICATION_STATUS)
Check for tax_id
In case of error - return 1138 (PERSON_HAS_NO_TAX_ID)
Check for focus document.type
If it is not match with value in EMAL_ERLN_CREATE_RECORD_JOB_DOCUMENT_TYPE_CODES - return 10916 (IDENTIFICATION_FAILED_DOCUMENT_ABSENT)
If focus.documen_type is not match with value in EMAL_VALIDATION_FOCUS_DOCUMENTS_BY_CATEGORY - return 1212 (INVALID_NEWBORN_FOCUS_DOCUMENTS) or 1213 (INVALID_DISABILITY_FOCUS_DOCUMENTS)
Check for focus.gender
If focus gender is not match with value in EMAL_VALIDATION_FOCUS_GENDERS_BY_CATEGORY or it's not specified - return 1208 (INVALID_NEWBORN_FOCUS_GENDER) or 1209 (INVALID_DISABILITY_FOCUS_GENDER)
Check for focus age
If age of the person is not match with value in EMAL_VALIDATION_FOCUS_ALLOWED_AGES_BY_CATEGORY - return 1206 (INVALID_NEWBORN_FOCUS_AGE) or 1207 (INVALID_DISABILITY_FOCUS_AGE)
Check that authentication method with type = ‘THIRD_PERSON’ is submitted in AUTHORIZE_WITH extension for person that must be authorized by confidant person using following logic:
persons age < no_self_registration_age global parameter;
persons age between no_self_registration_age and person_full_legal_capacity_age global parameters and person does not have document with type from PERSON_LEGAL_CAPACITY_DOCUMENT_TYPES config parameter;
persons age > person_full_legal_capacity_age global parameter and exists at least one active and approved confidant person relationship for person (using following process https://e-health-ua.atlassian.net/wiki/spaces/CSI/pages/17667883028 with
person_id
= person_id from request - expected:ok, :approved
response)in case any validation failed - return
If AUTHORIZE_WITH with type = ‘THIRD_PERSON’ does not exist - return 1230 FOCUS_NOT_LEGALLY_CAPABLE_WITHOUT_AUTHORIZATION
For Rectification cases:
If the records of identified and unidentified patients are not combined - return 1155 (CANT_AMEND_NO_MERGE_PAIR)
ЕСОЗ - публічна документація