...
This WS allows to create new medication program participant.
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 Program medication.
Program medication can be created only for a medical program with type MEDICATION.
Specification
Logic
Create new program medication entity: store input into program_medications table (prm). Also, set:
medication_request_allowed = true
is_active = true
inserted_at, updated_at = user_id (from token)
inserted_at, updated_at = current date and time.
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 Program medication.
Program medication can be created only for a medical program with type MEDICATION.
GraphQl Specification
Expand |
---|
title | createProgramMedication |
---|
|
Code Block |
---|
"Creates a single `ProgramMedication`."
createProgramMedication(
input: CreateProgramMedicationInput!
): CreateProgramMedicationPayload |
Code Block |
---|
"""
Input for `createProgramMedication` mutation.
User must have a scope **program_medication:write**
"""
input CreateProgramMedicationInput {
"Id of medication"
medicationId: ID!
"Medical program Identifier"
medicalProgramId: ID!
"Reimbursement information"
reimbursement: CreateReimbursementInput!
"Factory gate price for package of medications"
wholesalePrice: Float
"Consumer price for package of medications"
consumerPrice: Float
"Reimbuersement amount for recommended daily dosage of medication"
reimbursementDailyDosage: Float
"The estimatied amount which patient should pay for package of medications after reimbursement"
estimatedPaymentAmount: Float
"Start date of action for this entry"
startDate: Date
"End date for this entry"
endDate: Date
"General registry identifier"
registryNumber: String
}
"""
Input for `Reimbursement` of `createProgramMedication` mutation.
"""
input CreateReimbursementInput {
"Reimbursement type"
type: ReimbursementType!
"Reimbursement amount"
reimbursementAmount: Float
"Percentage of reimbursement."
percentageDiscount: Float
} |
Code Block |
---|
"""
Return type for `createProgramMedication` mutation.
"""
type CreateProgramMedicationPayload {
"Created `ProgramMedication`."
programMedication: ProgramMedication
}
"""
Program Medication linkes medication and medical program.
In order to obtain details user must have a scope **program_medication:read**
"""
type ProgramMedication implements Node {
"The ID of an object."
id: ID!
"Primary key identifier from the database."
databaseId: UUID!
"MedicalProgram."
medicalProgram: MedicalProgram!
"Medication"
medication: Medication!
"Reimbursement information."
reimbursement: Reimbursement!
"Factory gate price for package of medications"
wholesalePrice: Float
"Consumer price for package of medications"
consumerPrice: Float
"Reimbuersement amount for recommended daily dosage of medication"
reimbursementDailyDosage: Float
"The estimatied amount which patient should pay for package of medications after reimbursement"
estimatedPaymentAmount: Float
"Start date of action for this entry"
startDate: Date
"End date for this entry"
endDate: Date
"General registry identifier"
registryNumber: String
"Whether `ProgramMedication` is active or not?"
isActive: Boolean!
"Whether requesting medications allowed for the `ProgramMedication` or not?"
medicationRequestAllowed: Boolean!
"Date and time when record was inserted"
insertedAt: DateTime!
"Date and time when record was updated"
updatedAt: DateTime!
} |
|
...