...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Status
...
...
Purpose
This WS is designed to describe the process of creating new medical program.
APIary
http://docs.uaehealthapi.apiary.io/#reference/internal.-nhs-admin/medical-programs/create-medical-program
Input parameters
Authorize
- Verify the validity of access token
- Check user scope (scope = 'medical_programs:write') in order to perform this action
- In case error - generate 401 response
Validate request (JSON schema)
- Validate request using JSON schemas (TBD):
- Return 422 with list of validation errors in case validation fails (422 EView)
Create new Medical Program
- Create new record in Medical_programs
- Fill data
...
...
...
Prepare & return response data structure
...
Purpose
This WS allows to create a new medical 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 create a medical program.
A medical program with the type MEDICATION or SERVICE can be created.
Specification
Page Properties |
---|
Link | See GraphQl Specification | Посилання на Apiary або Swagger | Resource | See GraphQl Specification | Посилання на ресурс, наприклад: /api/persons/create | Scope | medical_program:write | Scope для доступу | Components | Medical Programs | Зазначається перелік бізнес компонентів, які використовують цей метод, наприклад: 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 | Метод є синхронним чи асинхронним? | Public/Private/Internal | Internal | |
|
Logic
Create medical program entity in medical_programs table (prm).
Set fields submitted on input: name and type.
Set following fields by default:
id = generate UUID value
is_active = true
medication_request_allowed = true
medication_dispense_allowed = true
medical_program_settings = null
inserted_at, updated_at = current date and time
inserted_by, updated_by = current user (from token).
Input parameters
API paragraph not found
Filters
API paragraph not found
Dictionaries
FUNDING_SOURCE
MR_BLANK_TYPES
PROVIDING_CONDITION
eHealth/clinical_impression_patient_categories
LICENSE_TYPE
MEDICAL_PROGRAM_TYPE
GraphQl Specification
Expand |
---|
title | createMedicalProgram |
---|
|
Code Block |
---|
"Creates a single `MedicalProgram`."
createMedicalProgram(
input: CreateMedicalProgramInput!
): CreateMedicalProgramPayload |
Code Block |
---|
"""
Input for `createMedicalProgram` mutation.
User must have a scope **medical_program:write**
"""
input CreateMedicalProgramInput {
"The name of the `MedicalProgram`."
name: String!
"Type of the `MedicalProgram`. The value should be present in the `MEDICAL_PROGRAM_TYPE` dictionary."
type: String!
} |
Code Block |
---|
"""
Return type for `createMedicalProgram` mutation.
"""
type CreateMedicalProgramPayload {
"Created `MedicalProgram`."
medicalProgram: MedicalProgram
}
"""
MedicalProgram contains details about medical program for reimbursement and services.
In order to obtain details user must have a scope **medical_program:read**
"""
type MedicalProgram implements Node {
"The ID of an object."
id: ID!
"Primary key identifier from the database."
databaseId: UUID!
"The name of the `MedicalProgram`."
name: String!
"Type of the `MedicalProgram`."
type: String!
"Whether the `MediaclProgram` is active or not?"
isActive: Boolean!
"Date and time when record was inserted."
insertedAt: DateTime!
"Date and time when record was updated."
updatedAt: DateTime!
"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: MedicalProgramSettings
"Medical program settings description"
medicalProgramSettingsText: String
}
"""
Medical program settings. Described at https://edenlab.atlassian.net/wiki/spaces/EH/pages/3132620836/Medical+program+settings
"""
type MedicalProgramSettings {
"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 from `EMPLOYEE_TYPE` dictionary to create medication request"
employeeTypesToCreateMedicationRequest: [String]
"Speciality types allowed. From `SPECIALITY_TYPE` dictionary"
specialityTypesAllowed: [String]
"conditions ICD10_AM allowed. From `eHealth/ICD10_AM/condition_code` dictionary"
conditionsIcd10AmAllowed: [String]
"Conditions ICPC2 allowed. From `eHealth/ICPC2/condition_code` dictionary"
conditionsIcpc2Allowed: [String]
"Maximum length in days of treatment period for `Medication Request` created with the program"
medicationRequestMaxPeriodDay: Int
"Providing conditions allowed. From `PROVIDING_CONDITION` dictionary"
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
} |
|
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 type = NHS
Validate request
Validate input according to schema only
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 | | |
|
Backward compatibility
API paragraph not found