Child pages
  • Emory SMART on FHIR API Guide and Implementation Strategies
Skip to end of metadata
Go to start of metadata



What is a SMART app?

A SMART app is most likely a web apps that is built upon a framework that has enabled development of 3rd party apps that run in the context of the EMR. The apps can be used by doctors, nurses and other practitioners (providers) or patients. They can be launched from within the EMR's UI or any web browser and can also run as native apps on mobile devices. SMART apps use the SMART framework for authentication and authorization to the EMR. SMART-on-FHIR contains specific logic for manipulating resources that are a part of the FHIR specification.

FHIR defines resources in JSON and contains rules about which attributes are required for by the resource, which are queryable, and the other details like their values and which standards are linked to. FHIR also defines metadata formats for discovering endpoints. 

SMART came first, before FHIR, and provided authorization but used something besides FHIR (some other HL7 protocol) to access resources.

Types of SMART Apps

Provider facing

NOTE

"Provider facing" is a general term to denote an app that allows the user to choose resources from many different patients. The inverse term is "Patient facing" where the app user is limited to the resources that they own or are owned by their relations. These are also specific terms used in the Cerner Developer Portal registration for an app.

These apps can be integrated into EHR "workflow". For Millenium+ this means running in the PowerChart environment on a clinical workstation. The EHR launches the app when triggered, e.g. on creation of an order for a lab test.

TO DO

Detail the process of requesting access to the CDP.

(scroll down)

Then the developer portal assigns test credentials to you to use to authenticate to the provider portal...

...when you click the launch button.


Login to the sandbox system with the test credentials.

Finally, the sample example launches with the Patient context/resource and Observations.



Patient facing

(standalone) (Cerner sandbox registration term)

    • Uses a patient portal to authenticated and obtain ehr data.. The Cerner sandbox supports this. The Cerner Sandbox Patient Portal is called FHIR Play. The records of the portal's fake patients, along with user IDs and passwords, are in the SMART on FHIR test patients.docx file.
      Here's the sample example MTP - Patient App app. 

Pick one of the patients in the SMART on FHIR test patients.docx.

Launch the sample example MTP - Patient App app (if you haven't already). The app will redirect you to the FHIRPLAY authentication server

Then you get the authorization screen when you login as fake patient Nancy_Smart:

Once authorized, the sample example MTP Patient app can finally run and be provided with the Patient and Observation resources.

Standalone non-authenticated (See Python example)

  • Much like Grady's implementation of the MTP app
  • No samples,yet!
  • SMART sandbox would say this uses a Confidential profile meaning the authentication credentials are stored in the secure client (server).
  • Cerner sandbox calls this a "system" App Type and doesn't support it.

Mobile SMART apps

TBD

Sandboxes

Cerner

Cerner Ignite Roadmap ← this need requires a Cerner Care Account

 is confidential! Do not share.

Cerner tutorial.


SMART IT

Epic


Danica

Datica Mock FHIR API


SMART on FHIR Profiles

To support apps that run unmodified across different health IT systems, we need a set of “ground rules” that define which data fields are required vs. optional, and which coding systems should be used in a given context. The FHIR specification leaves many of these decisions open to downstream implementers, to ensure that FHIR can work with a variety of use cases. But for a viable app platform, we need more.

Minimum Set of Data Fields

Common Clinical Data Set

Working with the community

As much as possible we want to avoid inventing these “ground rules” ourselves. In the United States, SMART has adopted the profiles outlined in the Argonaut Implementation Guide. Similarly, communities in other regions should work together to define a standard set of profiles that are appropriate for the terminology systems commonly used in their area.

Scopes

Not the monkey trial. These are many. patient/Patient.read and patient/Observation.read are but 2 required in the example app, among others.

patient vs. user scope

Self-Hosted Sandbox

If you’re an advanced user, you can set up a local copy of the sandbox on your computer, a local server, or a cloud server by following the instructions at https://github.com/smart-on-fhir/installer.


Mapping EHR model to FHIR

https://groups.google.com/forum/#!searchin/cerner-fhir-developers/map%7Csort:date/cerner-fhir-developers/Xu4d2JGDLNE/Ye-4OG_JBAAJ


Cerner FHIR Developers ›

Cerner FHIR Resource Content that is Included?
2 posts by 2 authors

  


Mayce

3/15/17

Hi Cerner Developers, 

For each of the Cerner FHIR resources being developed are all of the content listed on the FHIR's content documentation pages being included for each resource? 

For example, the Contract Resource doesn't include the Contract's Term List as shown under the FHIR Contract documentation page here: http://hl7.org/fhir/DSTU2/contract.html

Is this where only certain fields are being included in each Resource for Cerner? Or does the Cerner documentation just not list that information and the sandbox not contain those examples since it'll just return blank if it doesn't exist?

I just want to understand what content Cerner returns compared to what FHIR suggests.

I hope that makes sense, thank you for your help!

-Mayce

Click here to Reply


Dennis Patterson (Cerner)

3/17/17

Hi Mayce!

The examples listed on fhir.cerner.com should be considered examples and are not necessarily prescriptive of what every instance of a resource will return.  Some instances could contain more fields and some could contain less.

We have tried to map our Millennium data models to the FHIR spec as much as possible.  When it comes to optional fields, their presence can also be contingent on how the data was entered a particular client site.  Overall, we have sought to follow the Argonaut Implementation Guide for resources we've exposed, so I'd definitely encourage you to refer to that for resources that you're interested in consuming.

Dennis
- show quoted text -

Argonaut

The table below lists the FHIR Resources used for the corresponding 2015 Edition Common Clinical Data Set (CCDS) Data elements:

NoCCDS Data ElementFHR Resource
(1)Patient NamePatient
(2)SexPatient
(3)Date of birthPatient
(4)RacePatient
(5)EthnicityPatient
(6)Preferred languagePatient
(7)Smoking statusObservation
(8)ProblemsCondition
(9)MedicationsMedication, MedicationStatement, MedicationOrder
(10)Medication allergiesAllergyIntolerance
(11)Laboratory test(s)Observation, DiagnosticReport
(12)Laboratory value(s)/result(s)Observation, DiagnosticReport
(13)Vital signsObservation
(14)(no longer required)-
(15)ProceduresProcedure
(16)Care team member(s)CarePlan
(17)ImmunizationsImmunization
(18)Unique device identifier(s) for a patient’s implantable device(s)Device
(19)Assessment and plan of treatmentCarePlan
(20)GoalsGoal
(21)Health concernsCondition

Java Example

This example shows how to create a Patient resource


package edu.emory.lits.arch.sandbox;
import ca.uhn.fhir.context.FhirContext;
import java.io.IOException;
import org.hl7.fhir.dstu3.model.HumanName;
import org.hl7.fhir.dstu3.model.Patient;

public class FhirTest {
    public static void main(String[] args) throws IOException {
        // context - create this once, as it's an expensive operation
        // see http://hapifhir.io/doc_intro.html
        FhirContext ctx = FhirContext.forDstu3();
        Patient patient = new Patient();
        // you can use the Fluent API to chain calls
        // see http://hapifhir.io/doc_fhirobjects.html
        patient.addName().setUse(HumanName.NameUse.OFFICIAL)
                .addPrefix("Mr").setFamily("Fhirman").addGiven("Sam");
        patient.addIdentifier()
                .setSystem("http://ns.electronichealth.net.au/id/hi/ihi/1.0")
                .setValue("8003608166690503");
        System.out.println("Press Enter to serialise Resource to the console as XML.");
        System.in.read();
        // create a new XML parser and serialize our Patient object with it
        String encoded = ctx.newXmlParser().setPrettyPrint(true)
                .encodeResourceToString(patient);
        System.out.println(encoded);
        System.out.println("Press Enter to end.");
        System.in.read();
    }
}

CURL Example

curl https://sb-fhir-dstu2.smarthealthit.org/api/smartdstu2/open/Patient/SMART-1551992 \
       -H 'Accept: application/json'

is a patient query that returns a patient resource in JSON format.

Python Example using SMART open sandbox

There is no authentication needed to use this sandbox. This example shows how to query a Patient resource by ID:



from fhirclient import client
import fhirclient.models.patient as p
def main():
    settings = {
        'app_id': 'my_web_app',
        'api_base': 'https://sb-fhir-dstu2.smarthealthit.org/api/smartdstu2/open/'
    }
    smart = client.FHIRClient(settings=settings)
    print("FHIRClient version: ",client.__version__)
    patient = p.Patient.read('smart-1032702', smart.server)
    print(patient)
    print(patient.birthDate.isostring)
    # '1963-06-12'
    print(str(smart.human_name(patient.name[0])))
    '''Where is the doc for smart.human_name(), and the Patient object????'''
    # 'Christy Ebert'

if __name__ == '__main__':
    main()


This uses the "FHIRCLIENT" module version 1.0.3 to support FHIR DSTU2. Use pip to install: 

> pip install -I fhirclient==1.0.3


Miss Ellen E. Ohss

Did you know there is a SMART patient generator

View the SMART FHIR DSTU2 Data Dashboard: http://docs.smarthealthit.org/fhir-server-dashboard/?file=data-dstu2.json

Genomics data, get your genomics data here.

Slideshow

FHIR for Developers

FHIR Tutorial

HAPI-FHIR

Javadocs DSTU3

Javadocs DSTU2

Mirth Open Source

Begin hosting your own FHIR interfaces with Mirth® Connect

TODO

Implement this: http://docs.smarthealthit.org/tutorials/authorization/

  • No labels