Purpose
This WS allows to update existing medical program and add specific medical program settings for the program.
Key points
This is a graphQl method used in the Administration panel only.
Only authenticated and authorized NHS employee with an appropriate scope can update a Medical program.
This method allows to add/change medical program settings for the program.
Specification
Page Properties |
---|
Link | See GraphQl Specification | Посилання на Apiary або Swagger | Resource | See GraphQl Specification | Посилання на ресурс, наприклад: /api/persons/create | Scope | API paragraph not found | Scope для доступу | Components | API paragraph not found | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: ePrescription | Microservices | API paragraph not found | Перелік мікросервісів, які використовує метод API, наприклад: Auth, ABAC | Protocol type | API paragraph not found | Тип протоколу, який використовується запитом, наприклад: SOAP | REST | Request type | API paragraph not found | Тип запиту API, наприклад: GET, POST, PATCH… | Sync/Async | API paragraph not found | Метод є синхронним чи асинхронним? |
|
Logic
Update params submitted on input in the medical program entity. Also, set:
updated_by = current user (from token)
updated_at = current date and time.
Preconditions
API paragraph not found
Global and configurable parameters
API paragraph not found
Input parameters
API paragraph not found
Filters
API paragraph not found
Dictionaries
API paragraph not found
GraphQL Specification
Expand |
---|
title | updateMedicalProgram |
---|
|
Code Block |
---|
"Update a single `MedicalProgram`."
updateMedicalProgram(
input: UpdateMedicalProgramInput!
): UpdateMedicalProgramPayload |
Code Block |
---|
"""
Input for `updateMedicalProgram` mutation.
User must have a scope **medical_program:write**
"""
input UpdateMedicalProgramInput {
"The ID of an object."
id: ID!
"Whether it is possible to create `Medication Request`"
medicationRequestAllowed: Boolean
"Medication request allowed status description"
medicationRequestAllowedText: String
"Whether it is possible to create `Medication Dispense`"
medicationDispenseAllowed: Boolean
"Medication dispense allowed status description"
medicationDispenseAllowedText: String
"Medical program settings"
medicalProgramSettings: MedicalProgramSettingsInput
"Medical program settings description"
medicalProgramSettingsText: String
}
"""
Input for `MedicalProgramSettings` of `updateMedicalProgram` mutation.
"""
input MedicalProgramSettingsInput {
"Skip MNN in treatment period requirement flag"
skipMnnInTreatmentPeriod: Boolean
"Care plan requirement flag"
carePlanRequired: Boolean!
"Skip employee validation requirement flag"
skipEmployeeValidation: Boolean
"Allowed employee types to create medication request"
employeeTypesToCreateMedicationRequest: [String]
"Speciality types allowed"
specialityTypesAllowed: [String]
"conditions ICD10_AM allowed"
conditionsIcd10AmAllowed: [String]
"Conditions ICPC2 allowed"
conditionsIcpc2Allowed: [String]
"Maximum length in days of treatment period for `Medication Request` created with the program"
medicationRequestMaxPeriodDay: Int
"Providing conditions allowed"
providingConditionsAllowed: [String]
"Skip declaration verification for employee on create `Medication Request`"
skipMedicationRequestEmployeeDeclarationVerify: Boolean
"Skip declaration verification for legal entity on create `Medication Request`"
skipMedicationRequestLegalEntityDeclarationVerify: Boolean
"Allows multi dispense for `Medication Request`"
multiMedicationDispenseAllowed: Boolean
"Allows to process `Medication Dispense` without digital sign"
skipMedicationDispenseSign: Boolean
"Disables patient notification on operations with `Medication Request`"
medicationRequestNotificationDisabled: Boolean
"Specifies medication dispense period in days"
medicationDispensePeriodDay: Int
"Skip Contract and Medical Program Provision verification in medication dispense flow"
skipContractProvisionVerify: Boolean
"Allows to change medical program on create `Medication Dispense`"
medicalProgramChangeOnDispenseAllowed: Boolean
"Patient category requirement flag"
patientCategoryRequired: Boolean!
"Patient categories allowed. From `eHealth/clinical_impression_patient_categories` dictionary"
patientCategoriesAllowed: [String]
} |
|
...
Authorize
Verify the validity of access token
Verify that token is not expired
Check user scopes in order to perform this action (scope = 'medical_program:write')
API paragraph not found
Request data validation
Validate legal entity
Extract client_id from token.
Check client scopes in order to perform this action (scope = 'medical_program:write')
Check client type = NHS
Validate medical program ID
Check id exists in DB
in case of error - return 404 ('not_found')
...
Service logic
Update params submitted on input in the medical program entity. Also, set:
...
updated_by = current user (from token)
...
.
Processing
API paragraph not found
Response structure
API paragraph not found
Post-processing processes
API paragraph not found
HTTP status codes
Page Properties |
---|
HTTP status code | Message | What caused the error |
---|
401 | Invalid access token | | 403 | | | 404 | not_found | Check id exists in DB failed |
|
Backward compatibility
API paragraph not found