How FHIR APIs Can Enable COVID-19 Research

How FHIR APIs Can Enable COVID-19 Research

During the coronavirus (SARS-CoV-2) pandemic fast access to EHR (Electronic Health Record) data is more important than ever. Enabling rapid interoperability between healthcare providers, payers and researchers is essential for working together in the fight against COVID-19.

Fast Healthcare Interoperability Resources (FHIR) is a standard for the digital exchange of electronic healthcare information and has been widely adopted by healthcare providers due to recent federal regulations. In fact, the CDC just rolled out a tool to give healthcare organizations without EHRs the ability to report COVID data using FHIR. Because of its widespread use as well as its robust bulk analysis capabilities, FHIR is the ideal solution for analyzing and querying population-level COVID data.

1upHealth is offering our FHIR expertise and access to our COVID FHIR® Data sandbox on our BULK FHIR® Analytics platform. We are excited to enable technologists and researchers who want to help mitigate the COVID-19 pandemic whilst reducing the burden on providers.

Querying for COVID Data over FHIR

Thanks to the recent codes released in coding systems LOINC, SNOMED, CPT AND ICD-10-CM, it is possible to query COVID data using FHIR.

Here are some examples of relevant FHIR resources and the code sets you can use to analyze COVID cohorts as well as some example use cases:

  1. An observation resource represents a medical observation, such as blood pressure, heart rate or test results. Particularly relevant for COVID research are results from the various test kits. To obtain these results, use the codes LOINC has published on their website.

    1. Example Question: "How do I find patients who tested positive on the bioMerieux ARGENE® SARS-COV-2 R-GENE® test kit?"

    2. Answer: Search for observations with any of the following LOINC codes: 94531-1, 94533-7, 94534-5, 94500-6, 94502-2, 94502-2 with a result value of the SNOMED code 10828004 "Positive (qualifier value)".

    3. Example API Call:

        SELECT * FROM "1up.prod.us-west-2.analytics-6ea2c41c75c445f2ac2bbd1a82326866"."dstu2_observation" limit 10;
        WHERE lower(code.coding[1].system) LIKE '%loinc%'
        AND code.coding[1].code in ('94531-1', '94533-7', '94534-5', '94500-6', '94502-2', '94502-2')
    
  2. A procedure resource represents any procedure that has or is being done on a patient, such as surgery or diagnostic tests. Particularly relevant for COVID research are the use of ventilators as well as test administration. Use these CPT codes relevant to ventilation and COVID test administration and/or the relevant SNOMED codes.

    1. Example Question "How do I find patients who have not been tested for COVID-19 but died after being administered artificial respiration, such as a ventilator?":

    2. Answer: First, find all deceased patient resources. Then, subset them to only patients that do not link to the following procedures that represent testing for COVID-19, using these CPT codes: 87635, 86318, 86328, 86769 and these SNOMED codes: 840536004, 840535000. Then, subset these patients to only those who have had the following procedures that represent ventilators, using these CPT codes: 94002, 94003, 94004, 94660, 94662 and this SNOMED code: 40617009.

    3. Example API Call:

        SELECT split_part(subject.reference,'/',2)
        FROM "1up.prod.us-west-2.analytics-6ea2c41c75c445f2ac2bbd1a82326866"."dstu2_procedure"
    
        WHERE 
        (lower(code.coding[1].system) LIKE '%cpt%' AND code.coding[1].code IN ('94002', '94003', '94004', '94660', '94662'))
        OR
        (lower(code.coding[1].system) LIKE '%snomed%' AND code.coding[1].code IN ('40617009'))
        AND
        private_permissions = '1up_provider_16934'
        limit 10;
    
  3. A condition resource represents any condition that has been recorded onto a patient's medical record. Particularly relevant for COVID research are the recently released codes from ICD-10 and SNOMED, representing a COVID-19 diagnosis.

    1. Example Question: "How do I find patients with a confirmed COVID-19 diagnosis?"

    2. Answer: Find all patients matching this ICD-10 code: U07.1 and/or this SNOMED code: 840539006.

    3. Example API Call:

        SELECT pa.id AS patient_id,
                pa.birthdate AS patient_birthdate,
                pa.gender AS pateint_gender,
                pa.extension[1].valuecodeableconcept.text AS patient_race,
                pa.deceasedboolean AS deceased,
                pr.code.coding[1].system AS procedure_system,
                pr.code.coding[1].code AS procedure_code,
                pr.code.coding[1].display AS procedure_name
        FROM dstu2_patient AS pa
    
        INNER JOIN dstu2_procedure AS pr
        ON split_part(pr.subject.reference,'/',2) = pa.id
        WHERE deceasedboolean = true
    
            AND pa.id NOT IN 
            (SELECT split_part(subject.reference,'/',2)
            FROM dstu2_procedure
            WHERE NOT ( ( lower(code.coding[1].system) LIKE '%cpt%'
                    AND code.coding[1].code IN ('87635', '86318', '86328', '86769')         )
                    OR ( lower(code.coding[1].system) LIKE '%snomed%'
                    AND code.coding[1].code IN ('840536004', '840535000') ) ) 
            )
    
            AND pa.id IN
            (SELECT split_part(dstu2_procedure.subject.reference,'/',2)
            FROM dstu2_procedure
            WHERE 
            (lower(code.coding[1].system) LIKE '%cpt%' AND code.coding[1].code IN ('94002','94003', '94004', '94660', '94662'))
            OR (lower(code.coding[1].system) LIKE '%snomed%' AND code.coding[1].code IN ('40617009'))
            )