Validation | Structure Definition |
---|
Subject (patient_id) - is sent
- validate patient_id is UUID
- validate patient exists in DB
- validate patient is active and is_active=true
|
|
condition.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
|
primary_source |
primarySource - is sent
- validate primary_source is boolean
- validate primary_source is sent
|
|
asserter - validate asserter 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 asserter is sent if primary_source=true
|
|
report_originreportOrigin - validate report_origin is a codable concept
- validate report_origin is sent if primary_source=false
|
|
encounter (context) - validate context is reference to encounter
- validate context is reference to the encounter in the same transaction 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'
|
|
code - is sent
- validate code as a codable_concept
- validate code by dictionary `eHealth/ICD10/condition_codes`
| |
clinical_statusclinicalStatus - is sent
- validate clinical_status by dictionary eHealth/condition_clinical_statuses
| |
verification_statusverificationStatus - is sent
- validate verification_status by dictionary eHealth/condition_verification_statuses
| |
severity - validate severity as codeable_concept
- validate by dictionary eHealth/condition_severities
| |
body_sitesbodySites - validate body_sites as codeable_concept
- validate by dictionary eHealth/body_sites
| |
- is sent
- validate is a real date
- validate onset_date <= current_date
- condition[*].onset_date>=current_date-condition_max_days_passed
|
|
recordedDate (ex. asserted_date) - validate is a real dateTime
- validate recordedDate < current_date
|
|
stage - validate stage as codeable_concept
- validate by dictionary eHealth/condition_stages
| |
Evidence (evidences) - validate evidences is a reference to observation
- evidences is an ID of existing observation in DB or one in the same transaction
- validate observation is made for the same patient_id
- validate observation is not in status 'entered_in_error'
- validate observation.managing_organization = client_id from token
|
|