| 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
- that $.{encounter}[*].id from the payload are all unique among themselves
- there is no entity with such ID in the corresponding Medical events collection
|
|
| status. Validate - is sent
- by dictionary 'eHealth/risk_assessment_statuses'
|
|
| method. Validate - as codeable_concept
- by dictionary 'eHealth/risk_assessment_methods'
|
|
| code. Validate - is sent
- as codeable_concept
- by dictionary 'eHealth/risk_assessment_codes'
|
|
| 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'
|
|
| asserted_date. Validate - is sent
- is a real date_time
- asserted_date < now()
|
|
| primary_source. Validate - validate primary_source is boolean
- validate primary_source is sent
|
|
| performer. Validate - is reference to employee
- employee is active and is_active=true
- employee.legal_entity_id belong to MEDICATION_REQUEST_REQUEST_LEGAL_ENTITY_TYPES
- performer 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
|
|
| reason_codes. Validate - as codeable_concept
- by dictionary 'eHealth/risk_assessment_reasons'
|
|
| reason_references. Validate - as reference to "condition" or "observation" or "diagnostic_report"
|
|
| basis. Validate - as reference to "observation" or "condition" or "diagnostic_report"
|
|
| predictions. Validate |
|
| mitigation. Validate - as a string with max length = 2000
|
|
| comment. Validate - as a string with max length = 2000
|
|