API Documentation


API Version


Overview

This document discusses StreamlineMD FHIRAPI Version 1.0 and its methods to connect to the FHIRAPI Server and query patient data from StreamlineMD EHR.


Terms and Conditions of Use: This section discusses the terms and conditions of using FHIRAPI version 1.0.


StreamlineMD FHIRAPI Server: This section briefly discusses the StreamlineMD FHIRAPI Server and its components.


Registration: This section explains in detail about the registration process, if the user is new (i.e., not been registered earlier), its related method and about the input parameters to call the method.


Token: This section will give brief idea about how the token(i.e., access key) has be generated and which is very important to query the resources (e.g., Allergy Intolerance, Condition, etc.) for a patient.

Login: This This section will discusses about the login method and its input parameters to validate the login user and to identify the login user’s role.



FHIR Resources: This part of document will give details about how to call the methods for any FHIR resources (e.g., Allergy Intolerance, Condition, etc.), for a patient and details about the Resource bundle type.



Forgot Password: This section will explain how to call Forgot password method and how to call the method to save with new password.



Reset/Change Password: This section of document will explain how to call Reset/Change password method and how to call the method to save with new password.



Format: This section will show the format for input parameter as per the data type.



Summary: This section discusses the value of using the StreamlineMD FHIRAPI server and the benefits of implementing the FHIR ® Standard to provide true interoperability.



Note: Please note that all the methods that are been shown as an example in this document are in Visial C# language.



Terms and Conditions of Use

Documentation of API portal and materials including support of the FHIR® Specification (referred to as the “Materials”) have been made available to developers for development and testing. The Materials are provided to developers as-is with no other warranties expressed or implied. Developers may use the Materials with adherence to the below terms and conditions:


  1. StreamlineMD FHIRAPI portal has the most up-to-date documentation. Developers may keep copies of the Materials; however, they may not be distributed.

  2. Developers own developments using the Materials. StreamlineMD owns the Materials, as well as any improvements to or derivatives of the Materials, such as enhancements to the testing tools or documentation. A dynamic developer environment is encouraged. Any suggested improvements of the Materials may become part of the Materials without any obligation or notice to the submitter.

  3. Developers are responsible for the products developed and how the products connect to the community members’ software. Developers are also responsible for complying with all applicable laws, including not infringing on StreamlineMD’s or others’ intellectual property rights.

  4. Developers interested in advertising products using StreamlineMD EHR FHIRAPI, StreamlineMD's name, or StreamlineMD's logo, please contact helpdesk@streamlinemd.com to obtain permission.



About StreamlineMD FHIRAPI Server

The StreamlineMD FHIRAPI server adopted HL7 FHIR® in its core strategy to offer innovative solutions as the Internet of Interoperable Things™ around any healthcare system or medical device.

The FHIR® Standard has brought a resource approach to the StreamlineMD FHIRAPI server information model (i.e., Patient, Smoking Status, Problem, Medication Request, Medication Statement, Allergy Intolerance, Diagnostic Report, Vital, Procedure, Care Team Members, Immunization, Implantable Devices, Assessment and Plan, Goal, Health Concerns and All Data CCDA ), which is more granular than any other standard and fast to learn, develop, and implement solutions.





  • Authorization Service: Web-based SMART authorization and resource retrieval service developed on OAuth 2.0 specification.
  • RESTful Resource API: Healthcare data (i.e., Patient, Condition, Procedure, or Immunization) is securely hosted as resources on a web server. All of these resources can be searched as specified by FHIR® Release 3 (STU) Standard.
  • FHIRAPI Database: Database agnostic storage for the StreamlineMD platform that is tested with MS SQL server.
  • Authorization Database: : MS SQL Server data store to manage OAuth tokens and client application registrations with their authorization statuses.





Search Provider

SearchProvider method is to search the provider with the search parameters such as name, city, zip or npi. The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as Json data or null if nothing matched similar based on the search parameters.

  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/SearchProvider?


  • Method:

GET

  • URL Params



Optional:none


  • Data Params

{name=[provider name]&city=[city]&zip=[zip]&npi=[npi]}

  • Success Response

Code:200 OK

  • Error Response

Code: 404 NOT FOUND

Content:<OperationOutcome xmlns="http://hl7.org/fhir"> <issue>
<severity value="error" />
<diagnostics value="Not Found" />
</issue> </OperationOutcome>



public List<USPSearchProvider_Result > SearchProvider( string name, string city, string zip, string npi)

{

try

{

if (name == null ) name = "";

if (city == null ) city = "";

if (zip == null ) zip = "";

if (npi == null ) npi = "";

return _repo.SearchProvider(1, name, city, zip, "" , npi);

}

catch ( Exception ex)

{

return null;

}

}



Search Facility

SearchFacility method is to search the facility with the search parameters like name, city, zip or code. The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as Json data or null if nothing matched similar based on the search parameters.

  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/SearchFacility?


  • Method:

GET

  • URL Params


Optional: none


  • Data Params

{ name=[facility name]&[city]&[zip]&[code]}

  • Success Response

Code: 200 OK


  • Error Response


Code: 404 NOT FOUND

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Not Found" />

</issue>

</OperationOutcome>


public List<USPSearchProvider_Result > SearchFacility( string name, string city, string zip, string code)

{

try

{

if (name == null ) name = "";

if (city == null ) city = "";

if (zip == null ) zip = "";

if (code == null ) code = "";

return _repo.SearchProvider(2, name, city, zip, code, "");

}

catch ( Exception ex)

{

return null;

}

}



Validate Patient

ValidatePatient method takes the parameters list to search and validate the patient at the time of registration. The parameters will be such as Organizationcode, Lastname, Firstname, DateofBirth, Gender, Email, City and Zip. The concept is, if the patient is in the practice database then user will be allowed to be registered. The response is returned as “OK” or “Not Valid”.



  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/validatePatient?


  • Method:

GET

  • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "


Optional: none


  • Data Params

{ organizationcode=[orgcode]&[lastname]&[firstname]&[dateofbirth]&[gender]&[email]&[city]&[zip]}

  • Success Response

Code: 200 OK


  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>



public async Task<IHttpActionResult > validatePatient( string organizationCode, string lastName, string firstName, string dateOfBirth, string gender, string email, string city, string zip)

{

try

{

if (organizationCode == null ) organizationCode = string.Empty;

if (lastName == null ) lastName = string.Empty;

if (firstName == null ) firstName = string.Empty;

if (dateOfBirth == null ) dateOfBirth = string.Empty;

if (gender == null ) gender = string.Empty;

if (email == null ) email = string.Empty;

if (city == null ) city = string.Empty;

if (zip == null ) zip = string.Empty;


FHIRPatient obj = new FHIRPatient();

obj.organizationName = organizationCode;

if (obj.FindPatient(lastName, firstName, dateOfBirth, gender, email, city, zip).Count > 0)

{ return Ok(); }

return BadRequest( "Not Valid" );

}

catch ( Exception ex)

{

return BadRequest( "Message : " + ex.Message.ToString() + Environment .NewLine + "StackTrace : " + ex.StackTrace.ToString());

}

}



Validate Provider

ValidateProvider method takes the parameters to search and validate the particular provider at the time of registration similar to the validatepatient method. The parameters will be such as Lastname, Firstname and NPI. The concept is, if the provider is in the practice database then user will be allowed to be registered similar to the validatepatient method. The response is returned as “OK” or “Not Valid”.



  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/ValidateProvider?


  • Method:

GET

  • URL Params


Optional: none


  • Data Params

{ lastname=[last name]&[firstname]&[npi]}

  • Success Response

Code: 200 OK


  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>



public async Task<IHttpActionResult > ValidateProvider( string lastname, string firstname, string npi)

{

try

{

if (lastname == null ) lastname = string.Empty;

if (firstname == null ) firstname = string.Empty;

if (npi == null ) npi = string.Empty;


if (_repo.ValidateProvider(lastname, firstname, npi).Count > 0)

{ return Ok(); }

return BadRequest( "Not Valid" );

}

catch ( Exception ex)

{

return BadRequest( "Message : " + ex.Message.ToString() + Environment .NewLine + "StackTrace : " + ex.StackTrace.ToString());

}

}



Registration

Register method which takes the information list to save the values into the database. In the below example “FHIRUserRole = 1” if the registration is for patient role, “FHIRUserRole = 2” if the registration is for provider role and “FHIRUserRole = 3” if the registration is for 3rd party role.

The required information that are needed to be passed for patient registration such as Lastname, Firstname, DateofBirth, Gender, Email, City, Zip, UserRole (i.e., 1 for patient) and so on as per the requirements.

Similarly, the require information that are needed to be passed for provider registration like Last name, First name, NPI, User Role (i.e., 2 for provider) and so on as per the requirements.

If the registration is for any 3rd Party then “FHIRUserRole = 3” and require information that are needed to be passed to register can be like Business name, Application name or Application weblink and so on as per the requirements.

The response is returned as “OK” or “Not Valid” after the registration is successfully.



  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/Register?


  • Method:

POST

  • URL Params


Required: Content-Type="application/json"


Optional: none


  • Data Params

{

"FHIRUserID" : 0,

"LastName" : "[last name]",

"FirstName" : "[first name]"

}

  • Success Response

Code: 200 OK


  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


public async Task<IHttpActionResult > Register( FHIRUserModels userModel)

{

if (!ModelState.IsValid)

{

return BadRequest(ModelState);

}

if (userModel.FHIRUserRole == 1)

{

FHIRPatient obj = new FHIRPatient();

obj.organizationName = userModel.PracticeId;

int patId = obj.FindPatientId(userModel.LastName, userModel.FirstName, userModel.DOB, userModel.Gender, userModel.EmailId, userModel.City, userModel.ZIPCode);

if (patId > 0)

{ userModel.IdentityFieldId = patId.ToString(); }

}

if (userModel.FHIRUserRole == 2)

{

List<FHIREMRProviders > pro = _repo.ValidateProvider(userModel.LastName, userModel.FirstName, userModel.ProviderNPI);

if (pro.Count > 0)

{ userModel.IdentityFieldId = pro[0].User_ID.ToString(); }

}


int result = _repo.RegisterUser(userModel);

if (result == 0)

{

return BadRequest();

}

else

{

return Ok();

}


return Ok();

}



Forget Password

ForgetPassword method which takes the parameters as input to save the new password. The parameters will be like Username, Password, Security question (that has been saved at the time of registration) and Security answer (that has been saved at the time of registration). The response is returned as “OK” or “Does not Match”.



  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/ForgetPassword?


  • Method:

POST

  • URL Params


Required: Content-Type="application/json"


Optional: none


  • Data Params

{userName =[user name]&[password]&[ securityQuestion]&[securityAnswer] }


  • Success Response

Code: 200 OK


  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>



public async Task<IHttpActionResult > ForgetPassword( string userName, string password, string securityQuestion, string securityAnswer)

{

try

{

if (!ModelState.IsValid)

{

return BadRequest(ModelState);

}

int status = _repo.ForgotPassword(userName, password, securityQuestion, securityAnswer);

if (status == 1)

return Ok();

else

return BadRequest( "Does not Match" );

}

catch ( Exception ex)

{

return BadRequest( "Message : " + ex.Message.ToString() + Environment .NewLine + "StackTrace : " + ex.StackTrace.ToString());

}

}



Reset Password/ Change Password

ResetPassword method which takes the parameters as input to save the new password. The parameters will be like Username, Password and New password. The response is returned as “OK” or “Does not Match”.


  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/ResetPassword?


  • Method:

POST

  • URL Params


Required: Content-Type="application/json"


Optional: none


  • Data Params

{userName =[user name]&[currentpassword]&[ newPassword] }


  • Success Response

Code: 200 OK

  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>



public async Task<IHttpActionResult > ResetPassword( string userName, string password, string newPassword)

{

try

{

if (!ModelState.IsValid)

{

return BadRequest(ModelState);

}

int status = _repo.ResetPassword(userName, password, newPassword);

if (status == 1)

return Ok();

else

return BadRequest( "Does not Match" );

}

catch ( Exception ex)

{

return BadRequest( "Message : " + ex.Message.ToString() + Environment .NewLine + "StackTrace : " + ex.StackTrace.ToString());

}

}



User Authorization – Roles, Scopes and permissions : OAuth2

OAuth 2 is an authorization framework that enables applications to obtain limited access to user accounts on an HTTP service. It works by delegating user authentication to the service that hosts the user account, and authorizing third-party applications to access the user account. OAuth 2 provides authorization flows for web and desktop applications, and mobile devices. User Authorization is granted as per the scope and permissions allowed. The following roles define some default OAUTH2 scopes:


Patient role gives the user read-only access (by default) to a specific patient record only. Typically this user is either a patient or a patient authorized representative (family member, friend, guardian) who is allowed to access the patient’s record.

  • Scope: Patient/*.read-PatientID where PatientID is the internal ID of the Patient record in the StreamlineMD FHIRAPI server and allowing the user to access a specific patient data.


Client role gives the user read-only access (by default) to any patient record. Typically this user is either a care coordinator, provider or social worker or any 3rd party application.

  • Scope: User/*.read allowing the user to read any patient data.


Admin role gives the user read and write access (by default) to manage all patient records.

  • Scope: User/*.read User/*.write allowing the user to read or write on any patient data.


The StreamlineMD FHIRAPI portal allows administrators to edit the scope of a user and it supports adding multiple scopes. Once the scope is modified, there is a functionality to re-authorize the user with the new modified scopes.



Token


Returns Authenticated user’s OAUTH2 token. This token is used to add every request to the StreamlineMD FHIRAPI server. The access token expiry time will be of 5 minutes.


  • URL

then the URL is https://patientportal.streamlinemd.com/FHIRAPI/token

  • Method
:

POST

  • URL Params


Required:

Content-Type="application/x-www-form-urlencoded "

grant_type="password "

username : "[username]"

password : "[password]"


Optional: none


  • Data Params

None

  • Success Response

Code: 200 OK

Content: { "access_token": " UserTokenReturnedByAPI",

"token_type": "bearer",

"expires_in": 86399}

  • Error Response


Code: 402 UNAUTHORIZED

Content: {error: "Unauthorized: Access is denied due to invalid credentials."}


Login

API has getUserInformation method which takes the parameter like Username. The response is returned as Json data else null if nothing matched similar based on the parameter. The Bundle Resource will have the logged in user information like Username, FHIRUserID, ApplicationName, Firstname, Lastname, FHIRUserRole, PracticeID, IdentityFieldID as per the data been registered.


  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/getUserInformation?


  • Method:

GET

  • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "


Optional: none


  • Data Params

{ username=[user name]}

  • Success Response

Code: 200 OK

  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


public List<Object > getUserInformation( string username)

{

try

{

List<Object > user = _repo.getUserInformation(username).ToList();;

return user;

}

catch ( Exception ex)

{

return null;

}


}


Search Patient

The method, patient, is useful to search resource for patient data. It will take parameters such as patientID or name (i.e., patient name) . The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.


  • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/patient?


  • Method:

GET

  • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=”application/xml+fhir; charset=utf-8”


Optional: none


  • Data Params

{ name:contains=[patientname] } OR {patientID=[patientID] }

  • Success Response

Code: 200 OK

  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>




Get UserInformation In Detail

getUserInformationInDetail method which takes the parameter like organizationCode, userrole, IdentityFieldId, fhiruserID. The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as Json data else null if nothing matched similar based on the parameter. The Bundle Resource will have the detail information like FullName, Gender, dateofbirth, language, race, ethnicity, address and so on as per the data been used to search parameter. The detail information for both the Patient or Provider is received by passing organizationcode, userrole (i.e., 1 - for patient and 2 - for provider), identityfieldID (i.e., which is generated at registration time of provider or patient) and fhirUserID (i.e., Registered UserID).


  • URL

https://patientportal.streamlinemd.com/FHIRAPI/account/getUserInformationInDetail?


  • Method:

GET

  • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "


Optional: none


  • Data Params

{ username=[user name]& [userrole]&[IdentityFieldId]}

  • Success Response

Code: 200 OK


  • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


public List<Object > getUserInformationInDetail( string organizationCode, int userrole, string IdentityFieldId, string fhiruserID)

{

try

{

try

{

if (userrole == 1)

{

FHIRPatient obj = new FHIRPatient();

obj.organizationName = organizationCode;

List<object > data = obj.FindPatientInformationById( Convert.ToInt32(IdentityFieldId));

return data;

}

else if (userrole == 2)

{

FHIRPatient obj = new FHIRPatient();

obj.organizationName = organizationCode;

List<object > data = obj.FindUserInformationById( Convert.ToInt32(IdentityFieldId));

return data;

}

else

return null;

}

catch ( Exception ex)

{

return null;

}

}

catch ( Exception ex)

{

return null;

}


}


Resource Bundle


Resource bundle will be fetched for the following FHIR resources for the selected single Patient at a time:


  • Allergies

The method for Allergies will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/allergyintolerance?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact=[ patientID] &cond_date=ge[ fromdate] &cond_date=le[ fromdate] }

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Problems

The method for Problems will take parameters such as patientID, cond_date (i.e., fromdate), cond__date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/condition?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Medication Orders

The method for Medication Orders will take parameter list like patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/medicationrequest?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Medications

The method for Medications will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/medicationstatement?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Vital Signs

The method for Vital Signs will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/vital?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Lab/Diagnostic Reports

The method for Lab/Diagnostic Reports will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/diagnosticreport?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Immunizations

The method for Lab/Diagnostic Reports will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/immunization?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Procedures

The method for Procedures will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/procedure?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact=[patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Smoking Status

The method for Smoking Status will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/smokingstatus?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Implantable Device(s)

The method for Implantable Device(s) will take parameters such as patientID, cond_Date (i.e., fromdate), cond_Date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/device?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]cond_date=ge[fromdate]&cond_date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Care Team Member(s)

The method for Care Team Member(s) will take parameters such as patientID, fromdate (i.e., fromdate), todate (i.e., todate). These parameters will be mandatory. PatientID always required to be supplied but for the dates they can be blank like in other previously described methods. The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/careteam?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&fromdate=ge[fromdate]&todate=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Assessment and Plan of Treatment

The method for Assessment and Plan of Treatment will take parameters such as patientID, date (i.e., fromdate), date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/assessmentandplan?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&date=ge[fromdate]&date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Health Concerns

The method for Health Concerns will take parameters such as patientID, date (i.e., fromdate), date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/healthConcerns?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&date=ge[fromdate]&date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • Goals

The method for Goals will take parameters such as patientID, date (i.e., fromdate), date (i.e., todate). The response is returned as a Bundle Resource (refer to Bundle Resource on HL7.org) serialized as xml data else null if nothing matched similar based on the parameter.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/goal?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&date=ge[fromdate]&date=le[todate]}

note: ge=greater than equal to; le=lesser than equal to

    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>


  • All Data CCDA

The method for All Data CCDA will take parameters such as patientID, cond_date (i.e., fromdate), cond_date (i.e., todate). The response is returned as a Encounter Bundle Resource (refer to Bundle Resource on HL7.org) which includes informations like date, provider name and serialized as xml data else null if nothing matched similar based on the parameter. On selection of any specific row from the encounter list it will generate CCDA.

    • URL

https://patientportal.streamlinemd.com/FHIRAPI/FHIR/encounter?


    • Method:

GET

    • URL Params


Required: Authorization=" bearer UserTokenReturnedByAPI "

Content-type=” application/xml+fhir; charset=utf-8

Optional: none


    • Data Params

{ patientID:exact= [patientID]&cond_date=ge[fromdate]&cond_date=le[todate]}

      Terms and Conditions of Use
    • Success Response

Code: 200 OK


    • Error Response


Code: 400 Bad Request

Content: <OperationOutcome xmlns="http://hl7.org/fhir">

<issue>

<severity value="error" />

<diagnostics value="Bad Request" />

</issue>

</OperationOutcome>




Format

Data type format 1

If the datatype for input parameters for every Resource bundle is varchar, char, nvarchar then

The parameters will pass like

  • Example 1: {parameter1:exact=parameter value&parameter2&parameter3}

  • Example 2: {parameter1:contains = parameter value&parameter2&parameter3}


Data type format 2

If the datatype for input parameter for every Resource bundle is datetime, date then

The parameters will pass like

  • Example 1: {parameter1:exact=parameter value&parameter2=ge01/01/1900&parameter3}

Here, in ge01/01/1900, ge = greater than equal to; le = lesser than equal to

  • Example 2: {parameter1:exact=parameter value&parameter2=eq01/01/1900&parameter3}

Here, in eq01/01/1900, eq = equal to

  • Example 3: {parameter1:exact=parameter value&parameter2=ne01/01/1900&parameter3}

Here, in ne01/01/1900, ne =not equal to

  • Example 4: {parameter1:exact=parameter value&parameter2=gt01/01/1900&parameter3}

Here, in gt01/01/1900, gt =greater than

  • Example 5: {parameter1:exact=parameter value&parameter2=lt01/01/1900&parameter3}

Here, in lt01/01/1900, lt =lesser than


Data type format 3

If the datatype for input parameter for every Resource bundle is int, numeric, smallint, bigint, float and tinyint then the parameters will pass like

  • Example 1: {parameter1:exact=parameter value&parameter2=ge100&parameter3}

Here, in ge100, ge = greater than equal to;le = lesser than equal to

  • Example 2: {parameter1:exact=parameter value&parameter2=lt100&parameter3}

Here, in lt500, lt = lesser than

  • Example 3: {parameter1:exact=parameter value&parameter2=gt100&parameter3}

Here, in gt500, gt = greater than

  • Example 4: {parameter1:exact=parameter value&parameter2=eq100&parameter3}

Here, in eq500, eq = equal to

  • Example 5: {parameter1:exact=parameter value&parameter2=ne100&parameter3}

Here, in ne500, ne = not equal to


Summary


  1. The StreamlineMD FHIRAPI platform adopted HL7 FHIR® Standard as its core interoperability strategy. Besides supporting CCDA formats, everything will be normalized as appropriate FHIR® resource. This standard brought simplicity and flexibility to the StreamlineMD platform. The word Fast in FHIR® truly means fast; faster to learn, develop, and implement. StreamlineMD was able to successfully adopt the FHIR® Standard within just one year.

  2. The StreamlineMD FHIRAPI server is aimed at helping EMRs to achieve standards-based FHIRAPI capability.