Table of Contents | ||||
---|---|---|---|---|
|
Required parameters are marked with "*"
Якщо інформації по відповідному параметру немає, потрібно зазначити: “APIparagraph not found”.
Purpose*
This method is used to pre-qualify care plan activity in order to define whether the medical program could be applied in this particular case or not.
...
Page Properties | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Logic*
This method is used to pre-qualify care plan activity in order to define whether the medical program could be applied in this particular case or not.
...
Request to process the request using a token in the headers
Headers*
Наприклад:
Content-Type:application/json
Authorization:Bearer mF_9.B5f-4.1JqM
...
Check that value is an array with references of condition, observation, diagnostic report, clinical impression types.
in case of error - return 422 ('value is not allowed in enum')
Check that each reference:
is valid ME
belongs to the patient ($.subject)
in case of error - return 422 ('<medical event type> with such ID is not found')
If $.detail.reason_reference=clinical_impression:
Check that clinical impression is valid based on clinical_impression.code.coding.code and CLINICAL_IMPRESSION_PATIENT_CATEGORIES_<CODE.CODING.CODE>_VALIDITY_PERIOD chart parameter: difference between now() and clinical_impression.inserted_at date must be less than a value in chart parameter (pointed in config for a corresponding care plan category) for clinical impression code
in case of error - return 422 ("Clinical impression with patient category exceeds validity period")
5. Goal
Validate value in the field $.detail.goal, if submitted
...
Validate value with schema of the Period type
in case of error - return 422 schema validation error
Check values within $.CarePlan.Period
in case period.end validation error - return 422 ('Period end time must be within care plan period range, after period start date')
in case period.start validation error - return 422 ('Period start time must be within care plan period range')
...
Сheck program exists and active
in case not found or is_active==false return 200 with
status
= INVALID andrejection_reason
"Program not found"
Validate product is program participant:
If product is medication - validate that medication has brand that is an active member of the program (program_medications table)
in case not found or is_active==false return 200 with
status
= INVALID andrejection_reason
"Medication is not included in the program"
If product is service - validate that service is an active member of the program
in case not found or is_active==false return 200 with
status
= INVALID andrejection_reason
"Service is not included in the program"
if product is service_group - validate that service group is an active member of the program
in case not found or is_active==false return 200 with
status
= INVALID andrejection_reason
"Service group is not included in the program"
Validate medical program settings (prm.medical_programs table):
if there is a parameter speciality_types_allowed:
Check author’s speciality is present in speciality_types_allowed
in case of error - return return 200 with
status
= INVALID andrejection_reason
“Author’s specialty doesn't allow to create activity with medical program from request”
if there is a parameter conditions_icd10_am_allowed or/and conditions_icpc2_allowed:
Check related Care plan has condition codes in
addresses
field that correspond to codes pointed in conditions_icd10_am_allowed or/and conditions_icpc2_allowed (depending on dictionary - eHealth/ICD10_AM/condition_codes or eHealth/ICPC2/condition_codes)in case of error - return 200 with
status
= INVALID andrejection_reason
“Care plan diagnosis is not allowed for the medical program“
If there is a parameter providing_conditions_allowed:
Check related Care plan has a value in
terms_of_service
field that is included in the list of providing_conditions_allowed parameterin case of error - return 200 with
status
= INVALID andrejection_reason
“Care plan’s terms of service are not allowed for the medical program“
if there is a parameter patient_categories_allowed:
check if patient_categories_allowed is not null then $.detail.reason_reference should contain a reference on clinical_impression with patient category
check if patient_categories_allowed has codes in $.detail.reason_reference.[].clinical_impression.code.[].value that correspond to codes pointed in patient_categories_allowed
in case of error return 200 with
status
= INVALID withrejection_reason
("Clinical impression with patient category should be present in request for this medical program")
If program meets the requirements write status "VALID" according to apiary.
...