| Validation | SD |
---|
| subject (patient_id) - is sent
- validate patient_id is UUID
- validate patient exists in DB
- validate patient is active and is_active=true
|
|
| observation_id - is sent
- validate observation_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
|
|
| partOf. (diagnostic_report. ) Validate: - as reference to diagnostic_report
- diagnostic_report is sent in payload or exists in DB
- diagnostic_report not in status "entered_in_error"
|
|
| status. Validate: - by dictionary eHealth/observation_statuses
|
|
| category (categories). Validate: - is sent
- as codeable_concept
- by dictionary eHealth/observation_categories
|
|
| code. Validate - is sent
- as codeable_concept
- by dictionary eHealth/LOINC/observation_codes
|
|
| Encounter (context) - is sent
- validate context is reference to encounter
- validate context is reference to the encounter in the same payload or existing encounter in DB
- validate encounter is made for the same patient_id
- validate encounter.managing_organization = client_id from token
- validate encounter is not in status 'entered_in_error'
|
|
one_of | effective[x] (effective_date_time). Validate - as a real date
- current_date-observation_max_days_passed >= date <= current_time
|
|
effective[x] (effective_period ) - period as a Period
|
|
| issued. Validate: - is sent
- as a real Datetime
|
|
| primary_source - is sent
- validate primary_source is boolean
- validate primary_source is sent
|
|
one_of | 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
|
|
report_origin - validate asserter validate report_origin is a codable concept
- validate asserter validate report_origin is sent if primary_source=false
|
|
| interpretation. Validate - as codeable_concept
- by dictionary eHealth/observation_interpretations
|
|
| note (comment). Validate - as a string with max length = 2000
|
|
| bodySite (body_site). Validate - as codeable_concept
- by dictionary eHealth/body_sites
|
|
| method. Validate - as codeable_concept
- by dictionary eHealth/observation_methods
|
|
one_of
| value[x]. |
|
Quantity (value_quantity) | |
CodeableConcept (value_codeable_concept) - as codeable_concept
- by dictionary eHealth/body_sites
| |
SampledData (value_sampled_data) | |
| |
| |
| |
| |
| |
dateTime (value_date_time) | |
| |
| referenceRange (reference_ranges) | |
| reaction_on. Validate - as reference to immunization
- immunization is sent in payload or exists in DB
- immunization is made for the same person
- immunization is not in status 'entered_in_error'
|
|
| components - $.observations[*].components[*].value_period as a Period
|
|