ЕСОЗ - публічна документація

Search Medical programs

Purpose

This WS allows to search for a medication program.

Key points

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

  2. Only authenticated and authorized NHS employee with an appropriate scope can search for a medical program.

Specification

Link

See GraphQl Specification

Посилання на Apiary або Swagger

Resource

See GraphQl Specification

Посилання на ресурс, наприклад: /api/persons/create

Scope

medical_program:read

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

  1. Get list of all medical programs filtered by search parameters.

  2. Render list with medical program data according to schema.

Preconditions

API paragraph not found

Global and configurable parameters

API paragraph not found

Input parameters

API paragraph not found

Filters

  • databaseId - UUID, identifier of the medical program

  • name- String, name of the medical program

  • isActive - Boolean, medical program status

  • type - String, medical program type. Allowed values: MEDICATION, SERVICE

  • fundingSource - String, according to FUNDING_SOURCE dictionary. Allowed values: NHS, LOCAL

  • mrBlankType - String, according to MR_BLANK_TYPES dictionary

Dictionaries

API paragraph not found

GraphQL Specification

"Reads and enables pagination through a set of `MedicalProgram`." medicalPrograms( "A condition to be used in determining which values should be returned by the collection." filter: MedicalProgramFilter "The method to use when ordering collection items." orderBy: MedicalProgramOrderBy "Read all values in the set after (below) this cursor." after: String "Read all values in the set before (above) this cursor." before: String "Only read the first _n_ values of the set." first: Int "Only read the last _n_ values of the set." last: Int ): MedicalProgramConnection!
""" Fields to filter medical programs in the system. """ input MedicalProgramFilter { "Checks for equality with the object’s `databaseId` field." databaseId: UUID "Checks for matching with the object’s `name` field." name: String "Checks for equality with the object’s `isActive` field." isActive: Boolean "Checks for equality with the object’s `type` field." type: String "Checks for equality with the object’s `fundingSource` field." fundingSource: String }
""" A connection to a list of `MedicalProgram` items. """ type MedicalProgramConnection { "Information to aid in pagination." pageInfo: PageInfo! "A list of nodes." nodes: [MedicalProgram] "A list of edges." edges: [MedicalProgramEdge] } """ 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 "Funding source of the `MedicalProgram`." fundingSource: 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 "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

    • in case of error - return 401 (“Invalid access token”) in case of validation fails.

  • Verify that token is not expired

    • in case of error - return 401 (“Invalid access token”).

  • Check user scopes in order to perform this action (scope = 'medical_program:read')

    • return 403 (“Your scope does not allow to access this resource. Missing allowances: medical_program:write”) in case of invalid scope(s).

Headers

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:read')

    • in case of error - return 403 (“Your scope does not allow to access this resource. Missing allowances: medical_program:read”).

Processing

API paragraph not found

Response structure

API paragraph not found

Post-processing processes

API paragraph not found

HTTP status codes

HTTP status code

Message

What caused the error

HTTP status code

Message

What caused the error

 401

 Invalid access token

 

 403

 Your scope does not allow to access this resource. Missing allowances: medical_program:write

 

Backward compatibility

API paragraph not found

ЕСОЗ - публічна документація