LOINC Integration

Is anyone looking at adding code to automagically import the LOINC code set to the external data loads page?

One thing that tripped me up when I tried it before is the fact that the csv file comes with column names(status, system) that are reserved by mariaDB.

Did you guys see this?


@RachelEllison We are exploring how LOINC use can be integrated in encounters and lab orders. How are you using / planning to use the imported table? Have you explored use of accessory files instead of the starter file?

Hi @mdsupport not sure how to use the imported table within OpenEMR since there’s a many to one mappings of LOINC codes to certain things like vitals.

Like blood pressure. Sometimes BPS and BPD are their own separate code but there is at least one LOINC code where it contains both measurements. There are also different codes for different measurement locations and modalities. Also codes you think would be adjacent to one-another are often non-sequential.

Take a look at the body temperature group as an example:



Oral route

Rectal temperature

Typanic membrane

Body surface

Body temperature


My primary interest is in using it to import CCDA and FHIR data. I tried to load up different ccda files generated by synthea but it missed a lot of information due to serve_ccda.js at the time using a single hardcoded LOINC value for specific locations in the database.

1 Like

We want to look at converting panels into forms. As an example, instead of current fixed column form_vitals table, installation can choose one of the vitals panel:

LOINC Long Common Name
85354-9 Blood pressure panel with all children optional
88346-2 Intravascular blood pressure with exercise and post exercise panel
34553-8 Orthostatic blood pressure panel
55417-0 Short blood pressure panel
89263-8 Special circumstances associated observations panel
72513-5 Vital signs with smoking status and pain scale [VSP]
67795-5 Vital signs, weight, height, head circumference and oximetry panel HITSP
74728-7 Vital signs, weight, height, head circumference, oximetry, BMI, and BSA panel – HL7.CCDAr1.1
85353-1 Vital signs, weight, height, head circumference, oxygen saturation and BMI panel

If the last panel is chosen, we can build form and capture following data :

LOINC Name R/O/C Cardinality Example UCUM Units
85353-1 Vital signs, weight, height, head circumference, oxygen saturation and BMI panel
9279-1 Respiratory rate O 0…1 {breaths}/min
8867-4 Heart rate O 0…1 {beats}/min
8361-8 Body position with respect to gravity O 0…1
8887-2 Type of Heart rate device O 0…1
59408-5 Oxygen saturation in Arterial blood by Pulse oximetry O 0…1 %
3151-8 Inhaled oxygen flow rate O 0…1 L/min
8310-5 Body temperature O 0…1 Cel
8327-9 Body temperature measurement site O 0…1
8326-1 Type of Body temperature device O 0…1
8352-7 Clothing worn during measure O 0…1
8302-2 Body height O 0…1 [in_i]
8306-3 Body height --lying O 0…1 [in_us];cm
8287-5 Head Occipital-frontal circumference by Tape measure O 0…1 cm
29463-7 Body weight O 0…1 kg
39156-5 Body mass index (BMI) [Ratio] O 0…1 kg/m2

Guess if that works, it will make it easier to export CCDA/FHIR data. Thx

1 Like

The forms idea makes a lot of sense. My initial thought was to create a map using the top 2000 codes but what you’re proposing makes a lot more sense than what I was thinking.

1 Like

Hi Jerry,

I’ve installed OpenEMR on a google cloud instance.
When logging in as admin I don’t see either option required under the Prerequisites section, there’s simply no option to enable either API service:


Enable the Standard API service (/api/ endpoints) in OpenEMR menu: Administration->Globals->Connectors->“Enable OpenEMR Standard REST API” Enable the Patient Portal API service (/portal/ endpoints) in OpenEMR menu: Administration->Globals->Connectors->“Enable OpenEMR Patient Portal REST API”

I’m also getting a 404 when attempting any of the RESTful calls to pull tokens - which I believe is because I’m not able to enable these REST and FHIR APIs from the admin.

Is there a step I’m missing here?

Hi David,
I don’t understand why you wouldn’t. What version OpenEMR?

v6.0.0-dev(master today)

Also check your admin user permissions.

Hi Jerry,

I’m on v 5.0.1 - here’s my connectors screen, no enable OpenEMR REST API (or FHIR API option either).

I don’t see anything off in my Admin user settings

@sjpadgett @brady.miller


Is there any clear documentation on how to upgrade openEMR, specifically for ubuntu on google cloud platform?

The directions I’ve been able to scrounge up don’t seem to apply to this implementation and I’m apparently stuck getting this APIs activated until I’m on a newer version…

@mdsupport did your team get this working?

Use of LOINC data is complex since various records are linked to each other for multiple use cases. But taking first stab of making raw data available for use throughout the application. Not sure how much of our development will be useful for this project since we use database views and procedures to make core relationships logic available across multiple platforms. This project somehow does everything in PHP alone for whatever reasons.

If interested, also check out #5300.

My interest in LOINC is for lab panels only. From what I was reading last night the FHIR is still in Beta stage. But it pulls everything like you are saying and the observations are not in my scope of work right now.
From what you said about views. Your team have DBA experience. I have run across databases with views that took over the clinical rules to manage those relationships.
One day I may have those skills.

Last time I looked, that interface requires getting catalog from individual lab and stores it in its own structure. You should look at eliminating that approach and using LOINC data from central table. In FHIR/interconnected world, practices or labs should not be inventing their own codes that no one else will understand.

If you post your detailed requirements and plan in a separate thread, I can give my 2 cents.

1 Like