| SD+Validation | Comments |
---|
1 | id - is sent
- validate condition_id is UUID
- validate that $.{collection}[*].id from the payload are all unique among themselves
- validate there is no entity with such id in the corresponding Medical events collection
| |
2 | subject - validate patient_id is UUID
- validate patient exists in DB
- validate patient is active and is_active=true
| |
3 | basedOn based_on - is a uuid
- is service request
- SR.status is active or in progress
- SR.used_by_legal_entity==token.client_id
- service_request.expiration date should be <= now
| |
4 | status - is sent
- by dictionary eHealth/procedure_statuses
| |
5 | statusReason status_reason - by dictionary eHealth/procedure_status_reasons
| |
6 | explanatory_letter | |
7 | category - is sent
- is codableConcept
- by dictionary eHealth/procedure_categories
| |
8 | code - is sent
- is a reference to service
- is_active = true
- validate code is the same service as is in SR, or is included to the service group in SR
| |
89 | encounter - is reference to encounter
- encounter is in payload or in DB
- encounter is made for the same patient
| |
910 | performedDateTime performed_date_time - is sent
- performed_date_time is real
- performed_date_time <= now
| |
1011 | recorder recorded_by - is sent
- is a reference to employee
- employee status ='APPROVED' and is_active=true
| |
1112 | primarySource - is sent
- validate primary_source is boolean
| |
1213 | One of reportOrigin report_origin - validate report_origin is a codable concept
- validate report_origin is sent if primary_source=false
performer - validate performer is a reference to employee
- validate employee is active and is_active=true
- validate employee.legal_entity_id belong to MEDICATION_REQUEST_REQUEST_LEGAL_ENTITY_TYPES
- validate performer is sent if primary_source=true
| |
131414 | |
15 | location division - as a reference to division
- PRM.division.status = "ACTIVE" and is-active=true
- PRM.division.legal_entity= token.client_id
| |
1516 | managing_organization | |
1617 | reasonReference reason_references - is a Reference to condition
- condition not in status ENTERED_IN_ERROR
| |
1718 | outcome - is a codableConcept
- by dictionary eHealth/procedure_outcomes
| |
1819 | complicationDetail complication_details - is reference to condition
- condition not in status ENTERED_IN_ERROR
| |
1920 | note | |
2021 | originEpisode | |