URLS
URL
MD Logic FHIR API Can be accessed at the following URL
FHIR Endpoint: https://www.mdlogiccloud.com/api/fhir
Documentation
https://www.mdlogic.com/solutions/standard-api-documentation
License Agreement
https://www.mdlogic.com/solutions/api-license
Response Codes
ALL responses from the server will be in a JSON object with the following codes.
200: Ok
401: Unauthorized
400: Bad Request
500: Internal Server Error
Authorization
Authentication
MD Logic Inc. requires that SMART on FHIR applications be registered before they can access data. To start the registration process, please submit a request by filling out the form located at the bottom of this page.
MD Logic Inc. will review your request and if you are approved you will receive an OAuth client_id to use on subsequent requests following the protocols specified in the official SMART App Authorization Guide.
You will be given a unique client_id for each MD Logic client where you want your application to access data.
MD Logic’s API uses the OAuth 2.0 protocol for authentication. All API requests must include an Authorization header with an Access Token of the form:
Authorization: Bearer MY_JWT_TOKEN
Confidential clients, that have the capability of securely storing credentials will be issued a client_secret that may be used in conjunction with the client_id to form an authorization grant (code). This code can then be used to obtain the access token and refresh token. Refresh tokens will be valid for a period of 3 months.
Public applications, such as native apps, which are incapable of securely storing credentials will not be issued a client_secret. Instead, the authorization_code grant flow will be used to issue refresh tokens. As recommended in the OAuth 2.0 Authorization Framework spec (RFC 6749).
Refresh tokens are valid for a period of 3 months and are single use only.
Sigle Patient Applications
Single patient applications will require an extra authentication step. The patient will be required enter their credentials used at View My Health Records. This is the partner MD Logic uses for its patient portal capabilities. The Medical Office that corresponds to the client id will need to enable access for the patient if they have not already done so.
Data Calls and Example Requests
The following data types are supported in the MD Logic API. Each type follows the FHIR 4.0 SPEC and the US Core Profile 3.1.1 where applicable. Note there are links provided for each data type.
All data calls are GET requests unless otherwise specified.
Allergy
The AllergyIntolerance (US Core Version) resource provides a bundle of allergies for a given patient resource.
https://mdlogiccloud.com/api/fhir/AllergyIntolerance?patient={Patient ID}
Example:
https://mdlogiccloud.com/api/fhir/AllergyIntolerance?patient=45
Condition
Condition (US Core Version) resources identify a condition, diagnosis, or other clinical concept that has risen to a level of concern. Examples of API calls for condition resources are shown below:
https://mdlogiccloud.com/api/fhir/Condition?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Condition?patient=45
Device
Device (US Core Version) resources represent items used in the provision of healthcare, including medical devices such as durable (reusable) medical equipment, implantable devices, as well as disposable equipment used for diagnostic, treatment, and research. Specifically, resources for implantable devices use the US Core Implantable Device profile. Examples of API requests to retrieve device data are shown below:
https://mdlogiccloud.com/api/fhir/Device?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Device?patient=45
Goal
The Goal (US Core Version) represents a desired outcome for a patient condition.
https://mdlogiccloud.com/api/fhir/Goal?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Goal?patient=45
Immunization
Each Immunization (US Core Version) identifies an immunization performed on a patient.
https://mdlogiccloud.com/api/fhir/Immunization?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Immunization?patient=45
Observation
The Observation (US Core Version) records can include a variety of items used in diagnosing conditions and determining patient care. Observations are broken down into multiple sub categories including:
https://mdlogiccloud.com/api/fhir/Observation?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Observation?patient=45
Patient
The Patient (US Core Version) provides demographic and contact details about the patient.
Get patient by resource ID
https://mdlogiccloud.com/api/fhir/Patient/{patientID}
Example:
https://mdlogiccloud.com/api/fhir/Patient/45
The resource ID can also be used like a search parameter
https://mdlogiccloud.com/api/fhir/Patient?_id={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Patient?_id=45
Search for patients by name
Patients are searchable by their entire name, or just the given and family parts:
https://mdlogiccloud.com/api/fhir/Patient?name={string}
https://mdlogiccloud.com/api/fhir/Patient?given={string}
https://mdlogiccloud.com/api/fhir/Patient?family={string}
Examples:
https://mdlogiccloud.com/api/fhir/Patient?name=Alex
https://mdlogiccloud.com/api/fhir/Patient?given=Nancy
https://mdlogiccloud.com/api/fhir/Patient?family=Jones
Find using date of birth and patient name
Multiple parameters can be combined to help ensure search result uniqueness.
https://mdlogiccloud.com/api/fhir/Patient?birthdate={date}&name={string}
Example:
https://mdlogiccloud.com/api/fhir/Patient?birthdate=1940-01-01&name=John
Procedure
The Procedure (US Core Version) identifies procedures performed on a patient, such as surgery or diagnostic procedures.
Get all procedures for a specific patient
https://mdlogiccloud.com/api/fhir/Procedure?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/Procedure?patient=45
Find specific procedure by patient ID, code, and date
https://mdlogiccloud.com/api/fhir/Procedure?patient={patientID}&code={system}|{code}&date={date}
Examples:
Specific Date:
https://mdlogiccloud.com/api/fhir/Procedure?patient=45&code=http://snome...|35637008&date=2019-01-14T00:00:00Z
Date Range:
https://mdlogiccloud.com/api/fhir/Procedure?patient=45&code=http://snome...|35637008&date=ge2019-01-14T00:00:00Z&date=le2020-01-14T00:00:00Z
(date range)
CareTeam
The CareTeam (US Core Version) Identifies the different members of a patient’s care team, and the role that these members play in caring for the patient. A patient may have multiple care teams. Example API requests for care team information are shown below:
Get Care Teams for a specific patient
https://mdlogiccloud.com/api/fhir/CareTeam?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/CareTeam?patient=45
Find Care Teams using a patient ID and status of the care team
https://mdlogiccloud.com/api/fhir/CareTeam?patient={patientID}&status={status}
Examples:
https://mdlogiccloud.com/api/fhir/CareTeam?patient=45&status=active
https://mdlogiccloud.com/api/fhir/CareTeam?patient=45&status=inactive
Diagnostic Report
The Diagnostic Report (US Core Version) is used to summarize findings and test results from labs, imaging, and other diagnostics. Examples of API requests for diagnostic report resources are shown below:
Diagnostic Report falls into two categories
Report and Note Echange (US Core Version)
Laboratory Result Reporting (US Core Version)
Get Diagnostic Reports for a specific patient
https://mdlogiccloud.com/api/fhir/DiagnosticReport?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/DiagnosticReport?patient=45
Find by patient ID and category of report
https://mdlogiccloud.com/api/fhir/DiagnosticReport?patient={patientID}&category={system}|{code}
Example:
https://mdlogiccloud.com/api/fhir/DiagnosticReport?patient=45&http://loi...|LP29684-5
DocumentReference
The DocumentReference (US Core Version) identifies the location of a clinical note, image, or PDF related to a patient. This is used as a pointer to the location of the document: the actual content is stored elsewhere, and will need to be accessed separately. Example API requests for a specific document, as well as to see all of the documents associated with a particular patient, are shown below:
Get using DocumentReference ID
https://mdlogiccloud.com/api/fhir/DocumentReference/{documentReferenceID}
Example:
https://mdlogiccloud.com/api/fhir/DocumentReference/1048
Retrieve all document references related to a patient
https://mdlogiccloud.com/api/fhir/DocumentReference?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/DocumentReference?patient=45
Find by Patient ID, category and date search parameters
https://mdlogiccloud.com/api/fhir/DocumentReference?patient={patientID}&category={system}|{code}&date={date}
Example:
https://mdlogiccloud.com/api/fhir/DocumentReference?patient=45&category=...|11488-4&date=ge2020-01-01T00:00:00Z
MedicationRequest
The MedicationRequest (US Core Version) covers medication orders for a patient. This includes both inpatient and outpatient orders related to medications. This is not intended for diet prescriptions or for non-medication items (such as sunglasses, supplies, etc.)
Retrieve all medication requests related to a patient
https://mdlogiccloud.com/api/fhir/MedicationRequest?patient={patientID}
Example:
https://mdlogiccloud.com/api/fhir/MedicationRequest?patient=45
Find medications related to a patient based on the date/time that the order was initially created
https://mdlogiccloud.com/api/fhir/MedicationRequest?patient={patientID}&authoredon={date}
Examples:
Specific Date
https://mdlogiccloud.com/api/fhir/MedicationRequest?patient=45authoredon...
Date Range:
https://mdlogiccloud.com/api/fhir/MedicationRequest?patient=45&authoredo...
Get started with MD Logic API