Validation | SD |
---|
|
|
meta.profile |
|
subject (patient_id) validate: - is sent
- patient_id is UUID
- patient exists in DB
- patient is active and is_active=true
|
|
encounter_id validate: - is sent
- encounter_id 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
|
|
status validate: - by dictionary eHealth/encounter_statuses
|
|
date validate:- is sent
- date is real
- current_date-encounter_max_days_passed >= date <= current_date
|
|
visit. validate: - is sent
- visit as reference
- "visit" is a visit that belongs to the current patient
|
|
episodeOfCare (episode) validate - is sent
- episode as reference
- $.encounter.episode.identifier.value is one of ME.patinet{patient_id}.episodes{*}.id
- ME.patient{patinet_id}.episodes{episode_id}.status = 'active'
- ME.patient{patinet_id}.episodes{episode_id}.managing_organization==token.client_id
|
|
basedOn (incoming referrals). Validate: - as reference
- is used_by_legal_entity.identifier.value==token.client_id OR null
- status==active or program_processing_status=in_progress (any status is valid in case program_processing_status = in_progress)
- category=='409063005' (Counselling)
- program is defined program_processing_status=new, in_queue or in_progress
|
|
class. Validate: - is sent
- as coding itemitem
- by dictionary eHealth/encounter_classes
|
|
type. Validate: - is sent
- is codable concept
- by dictionary eHealth/encounter_classestypes
|
|
typeparticipant. performer. Validate: - is sent
- performer as a reference to employee
is codable conceptby dictionary eHealth/encounter_types- employee status = active and is_active=true
- is an ID of existing employee in PRM.Employees
- PRM.Employees.legal_entity== client_id
|
performer |
serviceProvider. Validate - is sent
| performer as - serviceProvider as a reference to
| employeeemployee status - legal_entity
- legal_entity status = active and is_active=true
| is an ID of existing employee in PRM.EmployeesPRM.Employees.- legal_entity.id == token.client_id
|
| |
reasons. Validate: - by dictionaries eHealth/ICPC2/reasons OR eHealth/ambulatory/reasons
|
|
diagnoses. Validate: diagnosis.condition - is sent
- as reference to condition
- condition is not in status `entered_in_error`
- condition is made for the same patient
diagnosis.use - codable_concept
diagnosis.rank - string
|
|
actions. Validate: - by dictionaries
eHealth/ICPC2/actions OR eHealth/ambulatory/actions
|
|
location division. Validate: - as a reference to division
- PRM.division.status = "ACTIVE" and is-active=true
- PRM.division.legal_entity= token.client_id
|
|
prescriptions. Validate: - as a string with max length = 2000
|
|
supporting_info. ValudateValidate: - as a reference to "observation" or "diagnostic_report"
- validate "observation" or "diagnostic_report" is not in status `entered_in_error`
|
|
hospitalization.admitSource - is codable concept
- by dictionary eHealth/encounter_sadmitSource
|
|
hospitalization.reAdmission - is codable concept
- by dictionary eHealth/encounter_reAdmission
|
|
encounter.priority - is codable concept
- by dictionary eHealth/encounter_priority
|
|
encounter.period |
|