openapi: 3.2.0 info: version: 1.0.0 title: NextGen Office FHIR Encounter 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: Encounter description: https://hl7.org/fhir/R4/encounter.html paths: /fhir/r4/Encounter/{id}: get: tags: - Encounter description: "Fetches a single Encounter. An interaction between a patient and healthcare provider(s) for the purpose of providing healthcare service(s) or assessing the health status of a patient. \n \n FHIR Resource: Encounter \n *\tEncounters \n \n FHIR Resource: Location \n * Location \n" parameters: - $ref: '#/components/parameters/encounter_id' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/Encounter' '404': $ref: '#/components/responses/ResourceNotFound404' '401': $ref: '#/components/responses/ResourceNotAuthorized401' /fhir/r4/Encounter: get: tags: - Encounter description: "Fetches a bundled resource containing encounter data based on the provided parameters.\n\n - If only `_id` is provided, a bundle containing a single encounter is returned.\n - If only `patient_id` is provided, multiple encounters for the patient may be returned.\n - If `patient_id` and `date` are provided, encounters matching the patient and date range are returned.\n - Requests containing both `_id` and `patient_id`, `_id` and `date`, only `date`, all three parameters together or providing no parameters will result in a `400 Bad Request`.\n\n FHIR Resource: Encounter \n *\tEncounters \n \n FHIR Resource: Location \n * Location \n" parameters: - $ref: '#/components/parameters/optional_patient_id' - $ref: '#/components/parameters/date' - $ref: '#/components/parameters/_id' responses: '200': description: success content: application/json: schema: $ref: '#/components/schemas/EncounterBundled' '400': description: "**Invalid request:** The following conditions will result in a `400 Bad Request`:\n\n - `_id` and `patient_id` cannot be provided together.\n - `_id` and `date` cannot be provided together.\n - Providing only `date` is not allowed.\n - Providing all three parameters (`_id`, `patient_id`, and `date`) is not allowed.\n - Providing none is not allowed." '404': $ref: '#/components/responses/ResourceNotFound404' '401': $ref: '#/components/responses/ResourceNotAuthorized401' components: responses: ResourceNotFound404: description: Resource not found ResourceNotAuthorized401: description: Resource not authorized to be viewed by this user schemas: Encounter: type: object properties: resourceType: type: string minLength: 1 id: type: string description: The id of the resource. meta: type: object description: Metadata about the resource properties: profile: type: array description: Profiles this resource claims to conform to items: type: string required: - profile identifier: type: array description: Identifier(s) by which this encounter is known items: type: object properties: use: type: string description: usual | official | temp | secondary | old system: type: string description: the namespace for the identifier value value: type: string description: The value that is unique required: - use status: type: string description: describe the encounter status. class: type: object description: Classification of patient encounte properties: system: type: string description: Identity of the terminology system code: type: string description: Symbol in syntax defined by the system display: type: string description: Representation defined by the system type: type: array items: type: object properties: coding: type: array description: Specific type of encounter items: type: object properties: system: type: string code: type: string display: type: string text: type: string subject: type: object properties: reference: type: string participant: type: array description: List of participants involved in the encounter items: type: object properties: type: type: array items: type: object properties: coding: type: array items: type: object properties: system: type: string code: type: string display: type: string text: type: string period: type: object properties: start: type: string end: type: string individual: type: object properties: reference: type: string period: type: object properties: start: type: string end: type: string reasoncode: type: array items: type: object properties: text: type: string hospitalization: type: object properties: dischargeDisposition: type: object properties: coding: type: array items: type: object properties: system: type: string code: type: string display: type: string text: type: string location: type: array items: type: object properties: location: type: object properties: reference: type: string required: - status - class - location - subject - resourceType - id - meta EncounterBundled: type: object properties: resourceType: type: string minLength: 1 id: type: string description: The id of the resource. meta: type: object properties: lastUpdated: type: string description: Date in format - YYYY-MM-DDThh:mm:ss+zz type: type: string minLength: 1 description: Type of Search total: type: integer description: Number of encounter in entry field link: type: array items: type: object properties: relation: type: string minLength: 1 description: relation of the resource with link provided in url url: type: string minLength: 1 description: FHIR URI of the request required: - relation - url entry: type: array items: type: object properties: fullUrl: type: string minLength: 1 description: FHIR URI of respective encounter resource in entry resource: $ref: '#/components/schemas/Encounter' required: - id - resourceType - meta - type parameters: optional_patient_id: description: The id of the patient name: patient in: query required: false schema: type: string date: description: A date parameter searches on a date/time or period. The only supported prefixes are - gt, lt, ge, le, eq. Example-gt2015-01-15. See https://www.hl7.org/fhir/R4/search.html#date. name: date in: query schema: type: string _id: description: The id of the resource name: _id in: query required: false schema: type: string encounter_id: description: The id of the resource with prefix values PT with hyphen.Example PT-123 name: id in: path required: true 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