Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This WS allows to create new medication program participant.

Key points

  1. This is a graphQl method used in the Administration panel only.

  2. Only authenticated and authorized NHS employee with an appropriate scope can create a Program medication.

  3. Program medication can be created only for a medical program with type MEDICATION.

Specification

Page Properties
API paragraph not found

Link

https://uaehealthapi.docs.apiary.io/#reference/internal.-nhs-admin/program-medications/create-program-medication

Resource

/program_medications

Scope

program_medication:write

Components

ePrescriptionDrugs and Program medications

Microservices

API paragraph not found

Protocol type

API paragraph not found

Request type

POST

Sync/Async

Sync

Public/Private/Internal

Internal. NHS Admin

Logic

  1. Create new program medication entity: store input into program_medications table (prm). Also, set:

    1. medication_request_allowed = true

    2. is_active = true

    3. inserted_at, updated_at = user_id (from token)

    4. inserted_at, updated_at = current date and time.

Key points

  1. This is a graphQl method used in the Administration panel only.

  2. Only authenticated and authorized NHS employee with an appropriate scope can create a Program medication.

  3. Program medication can be created only for a medical program with type MEDICATION.

GraphQl Specification

Expand
titlecreateProgramMedication
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!
}

...