openapi: 3.2.0 info: version: 1.0.0 title: NextGen Office FHIR Medication Dispense API description: 'Our API is coded against the US Core Specification (FHIR Version: 4.0.0) https://hl7.org/fhir/us/core/CapabilityStatement-server.html' contact: email: nextgen-office-api@nextgen.com servers: - url: https://fhir.meditouchehr.com/api/ security: - OauthSecurity: - patient/*.read tags: - name: MedicationDispense paths: /fhir/r4/MedicationDispense/{id}: get: tags: - MedicationDispense description: "Fetches a single medication dispense record by id. Medications are mapped to RxNorm codes. \n \n FHIR Resource: MedicationDispense \n *\tMedications" parameters: - $ref: '#/components/parameters/id' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MedicationDispense' '404': $ref: '#/components/responses/ResourceNotFound404' '401': $ref: '#/components/responses/ResourceNotAuthorized401' /fhir/r4/MedicationDispense: get: tags: - MedicationDispense description: 'Returns a FHIR Bundle of MedicationDispense resources for the patient. Supported search parameters: patient (required), status (optional), _revinclude (optional, for Provenance:target). Parameters reflect actual implementation.' parameters: - $ref: '#/components/parameters/patient' - $ref: '#/components/parameters/status' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/MedicationDispenseBundled' '404': $ref: '#/components/responses/ResourceNotFound404' '401': $ref: '#/components/responses/ResourceNotAuthorized401' components: schemas: MedicationDispenseBundled: type: object description: A FHIR Bundle of MedicationDispense resources properties: resourceType: type: string description: Always 'Bundle' id: type: string description: Persistent identifier for the bundle meta: type: object description: Metadata about the resource properties: lastUpdated: type: string format: date-time description: When the bundle was last updated required: - lastUpdated type: type: string description: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection total: type: integer description: Number of MedicationDispense in entry field link: type: array description: Links related to this bundle items: type: object properties: relation: type: string description: Relation type (e.g., self, next, previous) url: type: string minLength: 1 description: Reference details for the link required: - relation - url entry: type: array description: Entries in the bundle (each is a MedicationDispense resource) items: type: object properties: fullUrl: type: string minLength: 1 description: URI for resource (Absolute URL server address or URI for UUID/OID) resource: $ref: '#/components/schemas/MedicationDispense' required: - fullUrl - resource required: - resourceType - type - entry MedicationDispense: type: object description: Dispensing a medication to a named patient properties: resourceType: type: string minLength: 1 description: The type of the FHIR resource (should be 'MedicationDispense') id: type: string minLength: 1 description: The id of the resource with prefix values HX | VS | LR with hyphen.Example HX-123 meta: type: object description: Metadata about the resource properties: profile: description: Profiles this resource claims to conform to type: array items: type: string required: - profile status: type: string minLength: 1 description: preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown medicationCodeableConcept: type: object description: Coded form of the medication being dispensed (e.g., RxNorm) properties: coding: type: array items: type: object properties: system: type: string minLength: 1 description: The identification of the code system (e.g., RxNorm) code: type: string minLength: 1 description: The code itself from the code system display: type: string minLength: 1 description: Representation defined by the system required: - system - code - display text: type: string minLength: 1 description: Plain text representation of the concept required: - coding subject: type: object properties: reference: type: string minLength: 1 description: The patient for whom the medication is dispensed required: - reference performer: type: array description: Who performed the dispense items: type: object properties: actor: type: object properties: reference: type: string minLength: 1 description: Reference to the performer resource required: - reference required: - actor type: type: object properties: coding: type: array items: type: object description: Type of medication dispense (e.g. Trial fill, partial fill, emergency fill, etc.) properties: system: type: string minLength: 1 description: Code system for the type (e.g., http://terminology.hl7.org/CodeSystem/v3-ActCode) code: type: string minLength: 1 description: Code for the type of dispense display: type: string minLength: 1 description: Representation defined by the system required: - system - code - display text: type: string minLength: 1 description: Plain text representation of the concept required: - coding quantity: type: object properties: value: type: number description: Amount dispensed unit: type: string minLength: 1 description: Unit defined by the system system: type: string minLength: 1 description: Code system for the unit(e.g. http://unitsofmeasure.org) code: type: string minLength: 1 description: UCUM code for the unit required: - value - unit - system - code whenHandedOver: type: string format: date-time description: When product was given out or mailed dosageInstruction: type: array items: type: object description: How the medication is to be used by the patient or administered by the caregiver properties: text: type: string description: Free text dosage instructions e.g. SIG timing: type: object description: When medication should be administered properties: code: type: object description: Timing code for when medication should be administered properties: coding: type: array items: type: object properties: system: type: string minLength: 1 description: Symbol in syntax defined by the system code: type: string minLength: 1 description: Symbol in syntax defined by the system display: type: string minLength: 1 description: Representation defined by the system text: type: string minLength: 1 description: TimingAbbreviation defined by system (e.g. - BID | TID | QID | AM | PM | QD | QOD) required: - coding doseAndRate: type: array items: type: object description: Amount of medication administered properties: doseQuantity: type: object properties: value: type: number minimum: 1 description: Amount of medication per dose unit: type: string minLength: 1 description: Unit defined by the system system: type: string minLength: 1 description: Code system for the unit (e.g. http://unitsofmeasure.org) code: type: string minLength: 1 description: UCUM code for the unit required: - doseQuantity required: - text - timing - doseAndRate required: - resourceType - id - meta - status - medicationCodeableConcept - subject - performer - type - quantity - whenHandedOver - dosageInstruction responses: ResourceNotFound404: description: Resource not found ResourceNotAuthorized401: description: Resource not authorized to be viewed by this user parameters: patient: description: The id of the patient name: patient in: query required: true schema: type: string id: description: The id of the resource name: id in: path required: true schema: type: string status: description: Status of the medication dispense name: status in: query required: false schema: type: string securitySchemes: OauthSecurity: type: oauth2 flows: authorizationCode: scopes: openid: Open ID scope launch/patient: Used by clients to request a patient-scoped access token offline_access: Request a refresh_token that can be used to obtain a new access token to replace an expired one, and that will be usable for as long as the end-user remains online. patient/*.read: Read access to all Patient Resources authorizationUrl: https://idp-prod.prod.ngo.nextgenaws.net/auth/realms/nextgen/protocol/openid-connect/auth?aud=https://fhir.meditouchehr.com/api/fhir/r4 tokenUrl: https://idp-prod.prod.ngo.nextgenaws.net/auth/realms/nextgen/protocol/openid-connect/token description: Access code based oauth authentication externalDocs: description: Find out more about NextGen Office FHIR API url: https://www.nextgen.com/products-and-services/nextgen-office