Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Safe Opioid Prescription: A SMART on FHIR Approach to 
Clinical Decision Support 

Shyamashree Sinha1,2, Mark Jensen1,3, Sarah Mullin1, Peter L Elkin1 

1. Department of Biomedical Informatics, University at Buffalo State University of New York 

2. Department of Anesthesiology, University at Buffalo State University of New York 

3. Department of Philosophy, University at Buffalo State University of New York 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Abstract 

Background 

Prescription opioid pain medication overuse, misuse and abuse have been a significant contributing factor 
in the opioid epidemic. The rising death rates from opioid overdose have caused healthcare practitioners 
and researchers to work on optimizing pain therapy and limiting the prescriptions for pain medications. 
The state of New York has implemented a prescription drug monitoring program(PDMP), amended public 
health law to limit the prescription of opioids for acute pain and utilized the resources of the state and 
county health departments to help in curbing this epidemic. The recent publication of guidelines for 
prescription opioids from CDC [1] and ASIPP (American Society of Interventional pain practitioners) have 
independently reviewed literature and found good evidence of limiting opioid prescription for acute and 
chronic non cancer pain. [2] 

Method 

Over the last decade, advanced technology has increased the complexity of electronic health records 
systems leading to the development of Clinical Decision Support Systems (CDSS) to aid the work flow of 
healthcare providers. There are several systematic reviews on the effectiveness and utility of CDSSs. A 
common consensus is that commercially and locally developed CDSS are effective in improving patient 
measures while actual workload improvement and efficient cost-cutting measure are not significantly 
improved by CDSS. Patient provider involvement in developing CDSS is a determinant of its success and 
utilization rates. [7] Therefore, a plug and play form of CDSS which can be implemented from an external 
platform through secure channels would be more effective. 

Design 

The Health Level Seven’s (HL7) open licensed interoperability standard Fast Health Interoperability 
Resources (FHIR) has a platform, Substitutable Medical Applications and Reusable Technologies (SMART) 
for CDSS app development by a third party. [3] We adopted these open source standard to plan to develop 
an app for accessible and efficient implementation of the recently published guidelines for management 
of pain with prescription opioid medications. 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

 

 

 

 

 

 

 

 

Introduction 

The mortality rate due to Opioid overdose has been consistently rising over the last decade, 

reaching epidemic proportions. New York State, including Western New York, has had a steady 

rise in opioid related deaths from 2014 to 2015: natural and semisynthetic opioid overdose death 

rose by 13.3%, methadone related deaths rose by 9.1%, and synthetic opioid other than methadone 

related deaths rose by 135.7% [1]. There is evidence that overuse, misuse. and abuse of 

prescription opioid pain medication is one of the major contributing factors in the rising death toll. 

This reasoning led to the publication of the recent CDC guidelines for prescription [2]. 

The population health problem due to prescription opioid use, abuse and dependence has been 

progressively worsening over the last two decades. Clinicians are faced with the challenge of 

treating pain adequately to improve quality of life while trying to prevent the potential of overuse, 

abuse and dependence among patients who are being treated by prescription opioid medications. 

Many studies have shown narcotic pain medications are known to decrease pain threshold and 

increase the need for pain medications [3]. 

The need for clinical decision support for pain control and monitoring of patients’ medication has 

led to many attempts at developing tools based on established guidelines. The ASSIP recently 

published a two-part guideline on pain control which gives a stepwise approach to pain medication 

management and adequate pain control. This guideline states opioid pain medication therapy 

should only be limited to patients with intractable chronic pain who have shown demonstrable 

improvement with therapy [4]. 

Recently, the Centers for Disease Control and Prevention published a guideline for chronic opioid 

prescription based on a systematic review of current literature in 2016 [2]. These practice 

guidelines provide clinicians with a useful tool for making decisions of optimizing the use of 

prescription pain medications. However, the attempts at implementation of these guidelines in the 

form of applications have had limited outcomes that have been discussed later. 

Aim 

The goals for this CDSS tool are to achieve proper monitoring of prescription drugs, patients’ medication 
list and potential interactive medications, surveillance for abuse/ misuse, patient involvement in 
alternative therapy, reporting problems and obtaining adequate pain control. The final step would be to 
implement the system in clinical practice and to monitor usage rates and measure the outcomes of 
successful or unsuccessful implementations. 

DOI: 10.5210/ojphi.v9i2.8034 

Copyright ©2017 the author(s) 
This is an Open Access article. Authors own copyright of their articles appearing in the Online Journal of Public Health Informatics. 
Readers may copy articles without permission of the copyright owner(s), as long as the author and OJPHI are acknowledged in the copy 
and the copy is used for educational, not-for-profit purposes.  



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Clinical Decision Support Systems (CDSS) based on Electronic Health Records have been 

evolving for more than a decade. A paper published by the federal health IT unit outlines the need, 

importance and available technology behind the evolving CDSS tools [5]. 

Based on their recommendations a stepwise process of designing a CDSS would be to: 

1. Identify and quantify a ‘high-priority gap’ in clinical quality between current 

outcomes and a stated goal. ‘High priority’ is the need for quality of care 

improvement aligns with the strategic goals and treatment outcomes that the health 

care organization is aiming for. 

2. Map the workflow by which the clinical care pertaining to the target issue is 

delivered. 

3. Design a future state workflow that includes the best ideas for closing the gap and 

eliminates as much waste as possible. 

4. Identify the information necessary to support the future state workflow. Then, 

design, test, and perfect CDS interventions using the Four Rights- Right Info, Right 

Person, Right Medium and Right Format. 

Our goal is the creation of an application (app) based decision support tool that is high priority in 

terms of population health needs, minimizes the consumption of time for the provider, and is more 

interactive for the patient. In addition, this app could be utilized as an aide in implementation of 

the goals of precision medicine, focusing on patient-centered care. 

Therefore, in line with these goals, we propose the creation of the application OPIacutepain that 

follows the opioid prescribing guidelines set forth by the CDC to aide in the efficient and accurate 

prescription of opioid medication for acute pain. 

1. Background 

1.1 Justification for implementation of a CDSS for prescription of Opioid pain 

medication 

The state of New York has recently implemented an amendment of the NY public health law 

(NYPHL 3331) limiting the number of days of prescription for opioid pain medication to not more 

than seven days for any acute non-cancer/non-terminal illness pain [6]. Due to the rising death 

rates from opioid overdose, the CDC's prescription opioid pain medication guidelines are aimed at 

curbing opioid dependence, abuse and misuse of pain medications. The patients on opioid pain 

medications for chronic pain are required to be monitored by Prescription Drug Monitoring 

Programs (PDMPs) and regular urine screening. Applying the proper CDSS implementation to 

prescription opioid pain medications, the five steps are as follows [2]: 

· High Priority gap in the clinicians’ prescription of pain medication for acute pain 

conditions. The amendment of state law and CDC guidelines all aim at cutting 

down on that acute pain prescriptions. 

· The work flow of prescription of pain medication starts as follows- 

➢ with the patient being aware of the other options for pain control 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

➢ then, deciding upon a treatment goal and working towards fulfilment 

➢ followed by an evidence or guideline based approach to prescribing pain 
medications 

· Design a CDSS based on the latest technology. In order to be effective, the CDSS for 

opioids should be interactive and less invasive. Which means it can be used by the 

providers on demand and would be able to pull the right information for the patient 

in order to aid the clinician with decision making 

· The SMART on FIHR app would be written based on the current guidelines from 

CDC and ASIPP. 

1.2 Review of Current Opioid-related Apps and CDS systems 

The number of attempts at developing CDSS has resulted in an aversion to yet another system. 

The clinicians and healthcare providers look at it as more of a deterrent in their work flow than 

any help [7] [5]. However, different technological approaches may be able to help in finding an 

answer to the complexity of electronic health records. The need for development of newer CDSS 

were initially based on national stimuli for EHR adoption, Meaningful Use requirements, Medicare 

Access and CHIP Re Authorization Act(MACRA) and Merit-based Incentive Payment 

System(MIPS). The rise of precision medicine, genomics and dynamic changes in the approach to 

medical care increased the complexity of care needed more emphasis on coordination of care. The 

increasing cost of medical care, patient empowerment/awareness and technological push for App 

culture are also drivers for development of newer CDSS [7] [5]. 

There are many opioid conversion calculators and morphine equivalency calculators on the market. 

However, each one has issues as a point of care tool, whether a hard to use interface, requiring the 

internet to download guidelines, having no citations for evidence based assessment, or requiring 

many plug in values that could be automatically taken from the electronic health record (EHR) or 

electronic medical record (EMR). Especially when it comes to conversion, many of the apps are 

not reliable. A recent study assessed the output variability and professional medical involvement 

in the authorship of 23 different apps [8]. 52% of the apps had no stated medical professional 

involvement and 48% of the apps provided references for opioid conversion ratios [8]. 

The CDC recently released on app summarizing the 2016 guidelines. CDC Opioid Prescribing 

Guideline 2016 contains a morphine equivalency calculator, brief synopses of recommendations 

from the guidelines, glossary and a section on how to perform motivational interviewing with pain 

patients. The app includes links to full sections of the CDC guideline and references, but requires 

an internet connection. The MME calculator, which allows for multiple drugs to be calculated for 

a total MME/day, is built in and does not require internet connection and provides an alert when 

MME/day≥90. The alert suggests referring to a specialist and scheduling reassessment at least 

every 3 months, as well as suggesting recommendations through proper links in the app [9]. 

The pH Medical Opioid Converter App by Philip Eagan from the iTunes app store, use 2016 CDC 

guideline for Prescribing Opioids for Chronic Non-Cancerous Pain patients. The app includes an 

easy to use morphine equivalence calculator and an opioid to opioid calculator, using generic or 

trade names. Although the app has a simple to use interface and is based on current 

recommendations, it is the only one that comes at a cost ($1.99), it does not have an Android 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

counterpart, and very little information can be found about the author. In addition, like the CDC 

app, the guidelines and links are not built into the app and therefore, an internet connection is 

required [10]. 

The Safe Opioids app was developed with support from the Substance Abuse and Mental Health 

Services Administration through the Prescribers' Clinical Support System for Opioid Therapies. It 

includes four categories: Evaluation, Manage, Discontinue, and other online Resources. Under 

Evaluation, there is information on the assessment of pain, linking to an outside the app pdf, the 

Opioid Risk Tool, and links to drug prescription monitoring programs. Under manage, there is 

information on opioid management including links to medical guidelines on clinical use in 

treatment of chronic pain (e.g.: VA/DoD Clinical Practice Guidelines) from 2010. There is also a 

list of common side effects and advise for talking to patients about opioid abuse. There are also 

links to a tool for assessing depression. The app provides citations, showing how they are using 

evidence based medicine for decisions, however, the app is outdated and the citations have not 

been updated since 2010 [11]. 

OpioidCalc NYC, developed by The New York City Department of Health and Mental Hygiene 

(DOHMH), calculates MME based on the guidelines developed with the help of the CDC that 

outline key principles of safe and judicious prescribing practices, including high dosage defined 

as MME/day ≥100. The app provides citations for evidence-based practice decisions. The app 

allows users to quickly and easily calculate the total daily MME a patient is taking, based on type 

of opioid analgesic, strength, and quantity. Multiple types of opioid analgesics can be included in 

the total daily MME calculation. An alert is displayed for total daily MME greater than or equal 

to 100, indicating an increased risk for overdose. This alert also suggests reassessing the patient’s 

pain status and treatment plan and provides a link to the DOHMH opioid-prescribing guidelines 

for additional information. It does not include I.V. formulations of medications and does not align 

with current CDC guidelines [12]. 

Opioid pain medication documentation and surveillance system (PODS) from electronic health 

records is one of the early attempts at medication management and patient education efforts. Like 

many other apps included in the electronic health records it was time intensive and cumbersome 

due to the fact that it was not interactive with the rest of the ATHENA EHR-Opioid Therapy for 

chronic non-cancer pain pop-up [13]. There were many good features in this system like patient 

safety features and some early warnings. The pop up in the EHR had a patient identifier on graphic 

user interphase, caution window where the patients risk factors against prescribing pain medication 

were mentioned, the treatment options, data tables, treatment checklist and information for 

researchers would appear in separate sections of the window. The dosage calculator and other 

options were present in a dropdown section. 

The usability testing of this CDSS showed the lack of provider education, confusion in dosing 

calculations and titration schedules, access to relevant patient information, provider discontinuity, 

documentation, and access to validated assessment tools. Clinicians reported the time constraints 

in completing each prescribing decision and effective pain management based on guidelines. The 

figure below shows the pop up window. 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

 

Figure 1. GUI Source: https://www.ncbi.nlm.nih.gov/books/NBK43756/figure/advances-

michel_92.f1/?report=objectonly 

[Int J Med Inform. 2015 Apr;84(4):248-62. doi: 10.1016/j.ijmedinf.2015.01.004. 

Epub 2015 Jan 17.] 

2. Proposed Solution 

The SMART on FHIR platform for interactive and integrated CDSS development is an open 

source resource which will be used to implement CDC guidelines with an aim to cut down the rate 

of opioid prescription for acute pain. The third party app development process aids the wide scale 

utilization of the app in FHIR compatible EHR environment. This is a process of using cell phone 

technology in building a more dynamic (can be used by healthcare providers and patients through 

different portals) CDSS tool that is user friendly and does not have to be built in as a part of the 

EHR system. 

The SMART app will be independently placed in an APP library from where it can be accessed 

by the clinician while making the decision for treatment of pain. 

Figure 2. explains the flow of the platform. 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

 

Figure 2. Flow diagram for OPIacutepain a SMART on FHIR approach for prescription opioids 

for acute pain 

 

The CDC guidelines published in 2016 [2] were aimed at providing a decision making tool for 

clinicians, nurses and other healthcare providers to aid in the treatment of chronic and acute pain. 

The following chart (Figure 3) shows the different categories of pain the patients may present with 

and how the clinician may make their decision. 

Acute pain (first) Acute pain (prior 

history) 

Acute on chronic pain Chronic pain on opioid 

Inform physician of 

treatment goals for 

pain(Recommendation 

2) 

Inform physician of 

treatment goals for 

pain(Recommendation 

2) 

Inform physician of 

treatment goals for 

pain(Recommendation 

2) 

Inform physician of 

treatment goals for 

pain(Recommendation 

2) 

Non pharmacologic 

(rec 1) 

Assess Baseline pain 

and function- PEG 

assessment scale (see 

Appendix A) 

Assess Baseline pain 

and function- PEG 

assessment scale (see 

Appendix A) 

Assess Baseline pain 

and function- PEG 

assessment scale (see 

Appendix A) 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Alerts: history of 

mental illness, Alcohol 

or other substance 

abuse, smoking 

 

Alerts: history of 

mental illness, Alcohol 

or other substance 

abuse, smoking 

 

Alerts: history of 

mental illness, Alcohol 

or other substance 

abuse, smoking 

 

Alerts: history of 

mental illness, Alcohol 

or other substance 

abuse, smoking 

 

Figure 3. Categories of Pain and Recommendations from CDC guidelines 

 

The characteristics of the SMART Application that we propose are as follows: 

The Application is aimed at providing interactive EHR based guidelines for acute pain patients 

where non pharmacologic, non-opioid pain medications are tried first followed by a short term 

opioid pain medication therapy. 

The potential for fatal overdose may be there if the patient is on Benzodiazepines while being on 

opioid pain medication. Concurrent benzodiazepine usage may lead to fatalities in 31%–61% of 

the total overdose deaths [1]. This could be prevented by the interactive application. 

In addition, the initial daily dose of opioids should not exceed 50 MME/day and could go up to a 

maximum of 90MME per day. For dosages from 50 to 100 MME/day, risk for overdose increased 

by a factor of 1.9 to 4.6 compared to dosages of 1 to 20 MME/day. Greater than 100 MME/day 

increased by a factor of 2 to 8.9 compared to 1 to 20 MME/day [1]. Risk for serious harm on higher 

dosage of opioid outweighs the treatment benefits. 

The app will include a medication list of all the opioids a patient is currently using, and if there are 

opioids present, the conversion chart to calculate total MME/day produced by the CDC will be 

used to automatically calculate the total for the clinician (Figure 4). 

 

 

 

 

 

 

 

 

Figure 4. CDC Calculating MME Conversion Factor chart 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Finally, the app will check if a urine drug screen (UDS) has been ordered. The CDC guidelines 

state, that a UDS provides the ability to “identify patients who might be at higher risk for opioid 

overdose or opioid use disorder, and help determine which patients will benefit from greater 

caution and increased monitoring or interventions when risk factors are present [1]. Depending on 

the outcome of medications and observations, recommendations will be provided that include 

counseling, doing the PEG-assessment, ordering a UDS, not prescribing opioid medications, 

tapering of opioid medications, and checking the state prescription drug monitoring program 

(PDMP) data. An outline of the workflow of the proposed app is included in Figure 5. 

 

3. Methods 

3.1 FHIR 

FHIR® (Fast Healthcare Interoperability Resources) is a next generation standards framework that 

builds on Health Level Seven International (HL7), an ANSI-accredited standard developing 

organization which provides standards for the exchange, integration, sharing, and retrieval of 

electronic health information supporting clinical practice and management. According to the FHIR 

standards, it “leverages existing logical and theoretical models to provide a consistent, easy to 

implement, and rigorous mechanism for exchanging data between healthcare applications”. [14] 

In order to assure alignment with the current HL7 standards and interoperability, FHIR has built-

in mechanisms for traceability to the HL7 RIM [14]. 

The basic building blocks of FHIR are called resources which share a set of characteristics, 

including a definition, a common set of metadata, and a human readable part [14-16]. Table 1 

provides the list of resources and their elements that are of interest to the application. Following 

Meaningful Use Stage 2 criteria, resources rely on ontologies and terminologies, specifically 

SNOMED-CT, LOINC, RxNorm [14]. Therefore, our CDSS is ontology and terminology driven. 

Currently, FHIR version 1.0.2 is supported by Epic, Cerner, and Allscripts Professional, three 

prominent electronic health record (EHR) systems [7]. For instance, according to the Open Epic 

website, Epic’s integration works with FHIR 1.0.2 (DSTU2). With this specification, Epic supports 

retrieving data for most of the top-level resources such as “patient”, “observation”, “procedure”, 

“medication.” Since these are primarily the resources needed for our proposed app, this app could 

seemingly be used any system equipped with Epic, Cerner, or Allscripts professional and can 

easily be accessed through their web services and other methods, such as relational databases. 

  



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Table 1. FHIR resources used for OPIacutepain 

Resource Type: Patient 

Definition: 

The Patient Resource provides general demographic information about a 

person receiving health care services from a specific organization. 

Elements Definition Use in App 

Patient.name.given First name 

Used to Make Sure you are querying correct 

patient 

Patient.name.family Last name 

Used to Make Sure you are querying correct 

patient 

Patient.birthdate birthdate 

Used to Make Sure you are querying correct 

patient 

Patient.gender gender 

Used to Make Sure you are querying correct 

patient 

Resource Type: MedicationOrder 

Definition: 

An order for both supply of the medication and the instructions for 

administration of the medication to a patient. 

Elements Definition Use in App 

MedicationOrder.Status 

Lifecycle of prescription: want 

active not draft   

MedicationOrder.dateEnded 

Date when prescription was 

stopped Used to filter in only active/current prescriptions 

MedicationOrder.patient 

A link to a resource representing 

the person to whom the 

medication will be given. Medication for specific patient 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

MedicationOrder.medicationCodeableConcept 

Identifies the medication being 

administered. Uses RxNorm codes to identify medications 

MedicationOrder.reasonCodeableConcept Reason for writing prescription 

Can check for opioids used for chronic pain 

(SNOMED-CT code) 

MedicationOrder.dosageInstruction.dose[x] Gives dose and units (ie 5 ml) Used for MME calculator 

MedicationOrder.dosageInstruction.timing 

Gives how many times daily 

(timing can be coded by 

http://hl7.org/fhir/timing-

abbreviation) Used for MME calculator 

Resource Type: Diagnostic Report 

Definition: 

Findings and interpretations of diagnostic tests performed on patients. The 

report includes clinical context such as requesting and provider information 

Elements Definition Use in App 

DiagnosticReport.code 

Codes that describe Diagnostic 

reports 

Urinary Drug Screen (using LOINC code) 

ordered 

DiagnosticReport.result References Observation   

Resource Type: Observation 

Definition: 

Simple name/value pair assertions for laboratory data and other results such as vital 

signs, imaging results, and social history. 

Elements Definition Use in App 

Observation. Patient 

A link to a resource representing 

the patient to whose lab values 

they are.   

Observation. Code 

Codes identifying names of 

simple observations; Use 

LOINC or SNOMED codes Use LOINC codes for UDS results 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Observation. Date 
Date range into which the 

observation falls 

Recent Urinary Drug Screen or screen from 

history 

Observation. Encounter Identifies the medication being 

administered. Uses RxNorm codes to identify medications 

Observation. Value[x] 

Information determined as a 

result of making the 

observation .value Quantity 

gives a value; .Code able 

Concept gives a code; .value 

String gives a string output like 

“Positive” or “Negative” 

Can check for Positive and negative results from 

UDS 

 

  



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

3.2 SMART on FHIR 

SMART on FHIR is an open access standard based technology platform that creates apps that can 

run across different healthcare systems using the FHIR standards. With this interoperable system, 

patients, clinicians and healthcare providers can easily and efficiently access a library of apps to 

improve care based on personalized and precision medicine standards [8]. 

Unlike other CDS systems, SMART on FHIR focuses on creating an open and interoperable based 

technology platform, using FHIR standards, that allows vendor independent third-party apps to 

run securely using EHR data [8]. A publicly accessible app gallery links to dozens of clinical 

applications built on this platform that have been providing care at healthcare institutions such as 

Boston Children’s Hospital and Duke Medicine. SMART on FHIR platform has even been 

expanded to include genomic data standards to unify how genomic variant data are accessed from 

multiple sequencing systems [8,13]. 

SMART on FHIR has multiple components which include adaption of FHIR standards, 

authorization and authentication. Authorization is done using OAuth2, a Web standard for 

authorization whose key function is to enable an end user to approve a SMART app to access an 

EHR. Authentication is accomplished through OpenID Connect, a Web standard for 

authentication. It defines an OAuth2-based protocol allowing end users to sign into apps using 

external identity providers. The SMART on FHIR system, a health IT system that has implemented 

all of these components, can then run against a SMART on FHIR app. SMART on FHIR profiles 

require data to be coded using Meaningful Use terminologies and express constraints such as 

terminology restrictions, element cardinality restrictions, data type choice restrictions, and 

hierarchical structuring of resources [8]. Source code and examples of implementation are publicly 

available [3]. In addition, sandboxes, secure virtual testing environments that mimic a live EHR, 

are available through outlets such as Cerner's open developer [7,16]. 

3.3 Ontologies and Terminologies 

FHIR is designed to work with over 40 standardized terminologies and ontologies widely used in 

the biomedical informatics community [17]. See table 2. This project uses SNOMED-CT, RxNorm 

and LOINC. SNOMED CT is a standardized vocabulary for clinical terms used by physicians and 

other health care providers for the electronic exchange of medically-relevant health information 

[18]. In addition to providing thesaurus-capability for interlinking other coding systems and 

terminologies, SNOMED-CT provides a taxonomy, which is encoded in an ontological format. 

Elkin et. al [19] used the Mayo Clinic Vocabulary Server (MCVS) to successfully map free text 

clinical concepts to SNOMED -CT codes with a positive predictive value of 99.8 percent. RxNorm 

provides a standardized coding system for drugs, linking RxNorm identifiers to multiple other drug 

vocabularies [20]. RxNorm also provides some semantic structure by separating drug formulations 

from ingredients and separating brand names from clinical names, and so on. However, there is 

substantial overlap amongst codes, with no taxonomic way of grouping together the functional 

characteristics of drug families, such as the benzodiazepines. LOINC is a common reference 

terminology for clinical and laboratory measurements, assays, patient information, and so on [21]. 

However, unlike RxNorm, LOINC does not have any taxonomic structure encoded in way that 

allows machine reasoning as is possible with an ontological implementation. Neither terminology 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

links codes via formalized relations that support moving between levels of granularity in any 

systematic way. 

This is problematic for our project due to the large of number of potential codes we need to search 

on discover the prescription of opioids. Over 13,000 codes for various forms of opioids alone, not 

including benzodiazepines, and related drugs like muscle relaxants. There exists no subset of codes 

that would map to the entire value set constructed of drugs with the general opioid characteristics 

for potential of abuse. Enumerating all the potential codes is possible, even could be done 

automatically with the right scripting tools. However, it is not an extensible or easily updated 

methodology. If this application were to be effectively deployed in a clinical environment, a much 

more robust way of coding the resource requests would be required. At a minimum, the high-level 

logic of the decision tree would need to decouple form the particular value sets the enumerate all 

the possible drug and procedure codes 

Table 2: List of standard terminologies available in FIHR 

Name of Standard Name of Standard 

SNOMED CT IETF language 

RxNorm 
Mime Types Multipurpose Internet Mail 

Extensions 

LOINC 
Medical Device Codes defined in ISO 

11073-10101 

UCUM: UnitsOfMeasure DICOM Code Definitions 

NCI Metathesaurus Health Canada Drug Identification Number 

AMA CPT codes NUCC Provider Taxonomy 

NDF-RT National Drug File – Reference 

Terminology 

HGNC: Human Gene Nomenclature 

Committee 

Unique Ingredient Identifier (UNII) ENSEMBL reference sequence identifiers 

NDC/NHRIC Codes 
REFSEQ: National Center for Biotechnology 

Information (NCBI) 

CVX (Vaccine Administered) ClinVar 

ISO 2 letter Country Codes Sequence Ontology 

NUBC code system for Patient Discharge 

Status 
HGVS: Human Genome Variation Society 

RadLex 
DBSNP: Single Nucleotide Polymorphism 

database 

ICD-9 & ICD-10 
COSMIC: Catalogue Of Somatic Mutations 

In Cancer 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

ICPC International Classification of Primary 

Care 
LRG: Locus Reference Genomic Sequences 

ICF Classification of Functioning, Disability 

and Health 

OMIM: Online Mendelian Inheritance in 

Man 

Version 2 tables PubMed 

A HL7 v3 code system 
PHARMGKB: Pharmacogenomics 

Knowledge Base 

Anatomical Therapeutic Chemical 

Classification System 
ClinicalTrials.gov 

Anatomical Therapeutic Chemical 

Classification System 
European Bioinformatics Institute 

    

FHIR allows for the use of Concept Maps that allow for the linking of one or more codes (taken 

here to be concepts) to one or more codes in another system. The mappings use equivalence 

properties, similar to the kinds of synonymy relations found in thesauri, such as narrower, wider, 

specializes. In addition to mapping between concepts (codes), FIHR allows for the mapping 

between one or more concepts and a value set. This would allow for the trigger for query on 

Medication Order to use a generic set of codes to map to a much broader set of enumerated 

RxNorm codes for all relevant opioids. However, it still doesn’t alleviate the problems surrounding 

the maintenance and generation of that list as the guidelines or coding systems change. 

3.4 Proposed Development 

A hybrid HTML5 app is currently being built using the SMART JavaScript client library, an open 

library designed to assist with calling the FHIR API and handling the SMART on FHIR 

authorization and authentication workflow [4]. A HTML5 app was chosen for cross-platform use 

and to facilitate the app within the EHR environment by running it through a browser widget. 

Native iOS and Android applications may be developed in the future. 

In order to access the FHIR resources in the EHR through the EHR's web services, the app will 

use the following process. When a clinician wants to use OPIacutepain to assess the risk of 

prescribing, the EHR redirects to the SMART launch URI, implemented in the file launch.html, 

then redirects to the FHIR authorization server, and then after a successful authentication, redirects 

to the file index.html. The FHIR authorization server can then be accessed using the fhir-client.js 

file and calling FHIR.oauth2.authorize in the launch.html file with the client id. The authorization 

code is then exchanged for an access token to the authorization server using the FHIR client. When 

Index.html is invoked, the SMART application will have the ability to request FHIR resources 

from the EHR for the patient to run the SMART application. 

The FHIR JavaScript client also facilitates calling and searching code able concepts through the 

function by Codes to find our medication list through coded terms. Finally, the visual form of the 

application can be called from draw Visualization, a built in function that uses the identification 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

placeholders defined in index.html. This file contains the format for the output of the app. The 

displayed output for the clinician within the app will contain the MME/day risk calculator when it 

can be calculated based on listed medications, whether or not a previous UDS was ordered and the 

result, a table of medications for benzodiazepines and opioid medications, and patient 

identification details, including gender, date of birth, and condition. Finally, the appropriate patient 

specific recommendation based on the guidelines presented by the CDC and dependent on the 

outcomes from the medication lists, urine drug testing results, and MME/day calculator will be 

displayed for the clinician within the app. 

Usability testing will be done following the creation of the app to ensure that it adds to the 

workflow process of the clinician and is designed efficiently and productively for clinicians who 

frequently prescribe opioid medications. 

4. Discussion and Conclusion 

Prescription opioid pain medications are a big contributor to the opioid epidemic. Attempts have 

been made in the past to create CDSS tools within the EHR to aid clinicians in prescribing and 

managing patients with chronic pain. The effectiveness of CDSS depend on how well they are 

integrated and how easy it is to access them. 

The SMART on FHIR platform addresses both ease of access while maintaining safety and 

security of sensitive patient information through an authorization process. It also gives feedback 

based on personalized patient information. This type of third-party CDSS may be able to improve 

quality of care through precision medicine. In addition, there is no user training required as the 

app is able to collect the back ground information automatically and provide it on demand through 

a secure authentication process. The FHIR interoperability standards makes this usable by all 

EHRs that are compatible with HL7 FHIR standards. 

5. Limitations 

This OPIpain SMART on FHIR app is an open source interoperability standard based third party 

app that has not been tested and is a work in progress. The template that it is built on is new and 

has not received much feedback on its usability and effectivity. The outcome measure of these 

apps would take longer. Taking this background into consideration the following aspects would 

have to be taken into account in further developing and implementing this app. 

1. The accuracy of the EHR-specific logic to transform the specific data structures to 

corresponding FHIR resources and with SMART specific profiles so that it is able 

to pull up the proper information for this on demand app. 

2. The SMART on FHIR apps that have been used so far have not been able to validate 

the data that they have been pulling through the app. It is a work in progress and 

can only be evaluated on implementation. 

3. Semantic parsing of terminologies through FHIR would be based on the concept 

mapping which relies on how good the terminologies and codes are. 



Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

The interventions for regulating and monitoring prescription pain medications and optimizing pain 

management cannot be delayed till there are better methods of concept mapping. Hence it would 

only be as good as the current mapping standards. 

 

References 

1. Rudd RA. 2016. Increases in drug and opioid-involved overdose deaths—united states, 2010–

2015. MMWR Morbidity and Mortality Weekly Report. 65. 2017 Feb;20(2S):S3-S92. 

PubMed PMID: 28226332. 

2. Dowell D, Haegerich TM, Chou R. 2016. CDC guideline for prescribing opioids for chronic 

pain—united states, 2016. JAMA. 315(15), 1624-45. PubMed 

https://doi.org/10.1001/jama.2016.1464 

3. Mandel JC, Kreda DA, Mandl KD, Kohane IS, Ramoni RB. 2016. SMART on FHIR: A 

standards-based, interoperable apps platform for electronic health records. J Am Med Inform 

Assoc. 23(5), 899-908. Epub Feb 2016. doi:https://doi.org/10.1093/jamia/ocv189. PubMed 

4. Manchikanti L,et. al. 2017 Responsible,Safe, and Effective Prescription of Opioids for 

Chronic Non-Cancer Pain: American Society of Interventional Pain Physicians (ASIPP) 

Guidelines. Pain Physician. 

5. Federal Health IT website: CDSS guidelines: 

https://www.healthit.gov/sites/default/files/clinical-decision-support-0913.pdf 

6. New York Consolidated Laws, Public Health Law - PBH § 3331. Scheduled substances 

administering and dispensing by practitioners - http://codes.findlaw.com/ny/public-health-

law/pbh-sect-3331.html 

7. Lesselroth BJ, Yang J, McConnachie J, et al; Addressing the sociotechnical drivers of quality 

improvement: a case study of post-operative DVT prophylaxis computerised decision 

support 

8. Haffey F, Brady RR, Maxwell S. 2013. A comparison of the reliability of smartphone apps 

for opioid conversion. Drug Saf. 36(2), 111-17. PubMed https://doi.org/10.1007/s40264-

013-0015-0 

9. Guideline Resources. CDC Opioid Guideline Mobile App; 

https://www.cdc.gov/drugoverdose/prescribing/app.html 

10. pH – Medical Opioid Converter by Philip Eagan; https://itunes.apple.com/us/app/ph-

medical-opioid-converter/id1082147868?mt=8 

https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=26977696&dopt=Abstract
https://doi.org/10.1001/jama.2016.1464
https://doi.org/10.1093/jamia/ocv189
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=26911829&dopt=Abstract
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=23322549&dopt=Abstract
https://doi.org/10.1007/s40264-013-0015-0
https://doi.org/10.1007/s40264-013-0015-0


Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

11. Safe Opioids app aims to prescribe narcotics more appropriately with patients; by Douglas 

Maurer, DO/MPH/FAAFP | February 1, 2016 

https://www.imedicalapps.com/2016/02/safe-opioids-prescribing-narcotics- patients/ 

12. OpioidCalcNYC App. 

https://play.google.com/store/apps/details?id=gov.nyc.health.MME&hl=en 

13. Wilsey BL, Fishman SM, Casamalhuapa C, Gupta A. 2009. Documenting and improving 

opioid treatment: the Prescription Opioid Documentation and Surveillance (PODS) System. 

Pain Med. 10(5), 866-77. Epub Jul 2009. doi:https://doi.org/10.1111/j.1526-

4637.2009.00652.x. PubMed 

14. Using FHIR to develop a healthcare mobile application. Wireless Mobile Communication 

and Healthcare (Mobihealth), 2014 EAI 4th International Conference on; 2014: IEEE. 

15. FHIR. 2017. HL7.org: https://www.hl7.org/fhir/overview.html. 

16. Millenium. 2017. CernerCode: Cerner code: http://fhir.cerner.com/millennium/dstu2/ 

17. Alterovitz G, Warner J, Zhang P, Chen Y, Ullman-Cullere M, et al. 2015. Smart on fhir 

genomics: Facilitating standardized clinico-genomic apps. J Am Med Inform Assoc. •••, 

ocv045. PubMed https://doi.org/10.1093/jamia/ocv045 

18. SNOMED IHTSDO. (2017) https://www.nlm.nih.gov/healthit/snomedct/index.html 

19. Elkin PL, Brown SH, Husser CS, Bauer BA, Wahner-Roedler D, et al. 2006. Evaluation of 

the Content Coverage of SNOMED CT: Ability of SNOMED Clinical Terms to Represent 

Clinical Problem Lists. Mayo Clin Proc. 81(6), 741-48. PubMed 

https://doi.org/10.4065/81.6.741 

20. RxNorm NLM. UMLS (2017) https://www.nlm.nih.gov/research/umls/rxnorm/ 

21. 1998. Huff SM etal. (1998) Development of the Logical Observation Identifier Names and 

Codes (LOINC) vocabulary. J Am Med Inform Assoc. 5(3), 276-92. PubMed 

https://doi.org/10.1136/jamia.1998.0050276 

22. Manchikanti L,et. al. 2017 Responsible,Safe, and Effective Prescription of Opioids for 

Chronic Non-Cancer Pain: American Society of Interventional Pain Physicians (ASIPP) 

Guidelines. Pain Physician. 

Acknowledgements/Grants 

This work has been supported in part by an NIH NCATS Clinical and Translational Science 

Award (UL1TR001412-01) and an NIH T32grant (T32 GM099607) from the Department of 

Anesthesiology. 

 

https://doi.org/10.1111/j.1526-4637.2009.00652.x
https://doi.org/10.1111/j.1526-4637.2009.00652.x
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=19594846&dopt=Abstract
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=26198304&dopt=Abstract
https://doi.org/10.1093/jamia/ocv045
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=16770974&dopt=Abstract
https://doi.org/10.4065/81.6.741
https://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Retrieve&db=PubMed&list_uids=9609498&dopt=Abstract
https://doi.org/10.1136/jamia.1998.0050276


Safe Opioid Prescription: A SMART on FHIR Approach to Clinical Decision Support 
 
 

 

 Online Journal of Public Health Informatics * ISSN 1947-2579 * http://ojphi.org * 9(2):e193, 2017 

   

OJPHI 

Appendix 1: OPIacutepain: flow diagram