Validation | SD |
---|
patient_id validate: - is sent
- patient_id is UUID
- patient exists in DB
- patient is active and is_active=true
|
|
ID validate: - is sent
allergy_intolerance is UUID - that $.{encounter}[*].id from the payload are all unique among themselves
- there is no entity with such ID in the corresponding Medical events collection
|
|
clinical_status. Validate - is sent
- by dictionary 'eHealth/allergy_intolerance_clinical_statuses'
|
|
verification_status. Validate - is sent
- by dictionary 'eHealth/allergy_intolerance_verification_statuses'
|
|
type. Validate - is sent
- by dictionary 'eHealth/allergy_intolerance_types'
|
|
category. Validate - is sent
- by dictionary 'eHealth/allergy_intolerance_categories'
|
|
criticality. Validate - is sent
- by dictionary 'eHealth/allergy_intolerance_criticalities'
|
|
context. Validate - is sent
- 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. Validate - is sent
- as codeable_concept
- by dictionary 'eHealth/allergy_intolerance_codes'
|
|
onset_date_time. Validate - is sent
- as real date_time
|
|
asserted_date. Validate - is sent
- as real date_time
|
|
primary_source. Validate - validate primary_source is boolean
- validate primary_source is sent
|
|
asserter. Validate - 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_origin. Validate - validate report_origin is a codable concept
- validate report_origin is sent if primary_source=false
|
|
last_occurence. Validate - as real date_time
|
|