Validation | SD |
---|
patient_id - is sent
- validate patient_id is UUID
- validate patient exists in DB
- validate patient is active and is_active=true
|
|
device_id. Validate - is sent
- validate device_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
|
|
status. Validate - is sent
- by dictionary 'eHealth/device_statuses'
|
|
asserted_date. Validate - is sent
- as real date_time
|
|
usage_period. Validate - is sent
- as a
|
|
context. Validate - 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'
|
|
primary_source. Validate - validate primary_source is boolean
- validate primary_source is sent
|
|
asserter. Validate - is reference to employee
- employee is active and is_active=true
- employee.legal_entity_id belong to MEDICATION_REQUEST_REQUEST_LEGAL_ENTITY_TYPES
- 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
|
|
type. Validate - is sent
- as codeable_concept
- by dictionary 'eHealth/device_types'
|
|
lot_number. Validate
|
|
manufacturer. Validate - string (maxLength: 200)
|
|
manufacture_date. Validate - as real date_time
|
|
expiration_date. Validate - as real date_time
|
|
model. Validate - string (maxLength: 200)
|
|
version. Validate - string (maxLength: 200)
|
|
note. Validate - string (maxLength: 2000)
|
|