ЕСОЗ - публічна документація
RC_(CSI-2625) Submit Encounter Data Package
Зміни стосуються розділу “Validate Encounter”, підрозділу “Global validations”:
Validate Encounter
Global validations
Validate encounter id as a primary key (Submit Encounter Data Package | Primary key validation )
Validate that the date is within acceptable limits
$.encounter.date<= current_date
$.encounter.date>=current_date-encounter_max_days_passed
$.encounter.date>=episode.period.start where episode.id=$encounter.episode.identifier.value
in case of error return 422 "Encounter’s date must be equal to or greater than start date of episode"
Validate that the period is within acceptable limits
$.encounter.period.start<= current_date
in case of error return 422 "Date must be in past"
$.encounter.period.start>=current_date-encounter_max_days_passed
in case of error return 422 "Date must be greater than {{current_date-encounter_max_days_passed}}"
$.encounter.period.start>=episode.period.start where episode.id=$encounter.episode.identifier.value
in case of error return 422 "Encounter’s date must be equal to or greater than start date of episode"
$.encounter.period.end <= current_date
in case of error return 422 "End date must be equal to or less than current date"
$.encounter.period.end>= $.encounter.period.start
in case of error return 422 "End date must be greater than start date"
Validate "episode" is an active episode that belongs to the current patient
$.encounter.episode.identifier.value is one of ME.patinet{patient_id}.episodes{*}.id
in case of error return 422 "Episode with such ID is not found"
$.encounter.episode.identifier.value is an ID of an Episode that meets the requirements:
ME.patient{patinet_id}.episodes{episode_id}.status = 'active'
in case of error return 422 "Episode is not active"
ME.patient{patinet_id}.episodes{episode_id}.managing_organization==token.client_id
in case of error return 422 "Managing_organization in the episode does not correspond to user`s legal_entity"
ЕСОЗ - публічна документація