Nirmitee.io
HealthcareFHIR

Social Determinants of Health (SDOH) in FHIR: The Gravity Project Implementation Guide

April 10, 202614 min readUpdated Sep 26, 2026
Written by
Jitendra Choudhary
Jitendra Choudhary

CTO & Co-Founder

CTO & Co-Founder at Nirmitee.io. Architects healthcare integrations across FHIR, SMART on FHIR, ABDM and NHCX, writing from production experience taking hospital software from sandbox to go-live.

Social Determinants of Health (SDOH) in FHIR: The Gravity Project Implementation Guide

A patient with uncontrolled diabetes visits their physician every three months. Medications are adjusted. Lab work is ordered. Yet their A1C never improves. The reason has nothing to do with medicine — they can't afford the healthy food their care plan requires, and they live in a food desert with no grocery store within 10 miles.

This is the SDOH problem. Social determinants of health — food insecurity, housing instability, transportation barriers, social isolation, and interpersonal safety — account for 30-55% of health outcomes according to the WHO. Yet most EHR systems have no structured way to capture, code, or act on this data.

When you are ready to implement it, our FHIR integration team covers the build, testing and go-live.

Related Reading

For more insights, explore our guides on Interoperability's Next Frontier: SDOH & Behavioral Health and FHIR in Modern Healthcare.

You may also find value in EHR Software Development Guide and Building a Healthtech App.

The Gravity Project, an HL7 FHIR Accelerator initiative, has built the definitive FHIR implementation guide for SDOH data. It defines profiles, value sets, and workflows for screening patients, documenting social needs, making referrals to community organizations, and tracking outcomes — all using standard FHIR resources. As of 2026, CMS quality measures increasingly require SDOH screening data, making this implementation not just clinically valuable but regulatory necessary.

The Gravity Project: SDOH in FHIR

The Gravity Project SDOH Clinical Care Implementation Guide (HL7 IG) defines how to represent SDOH data across the entire clinical workflow: screening, assessment, diagnosis, goal-setting, referral, and outcome tracking.

Core FHIR Resources

FHIR ResourceSDOH RoleExampleGravity Profile
ObservationScreening responsesPatient reports food insecurity on AHC HRSN screeningSDOHCC Observation Screening Response
ConditionSDOH diagnosis/findingFood insecurity identified as active conditionSDOHCC Condition
GoalPatient SDOH goalsPatient will have consistent access to nutritious food within 3 monthsSDOHCC Goal
ServiceRequestReferrals to community orgsReferral to local food bank for SNAP enrollment assistanceSDOHCC ServiceRequest
TaskTrack referral statusFood bank received referral, patient enrolled, services deliveredSDOHCC Task for Referral Management
ConsentData sharing authorizationPatient consents to share SDOH data with community organizationSDOHCC Consent
ProcedureInterventions performedSDOH assessment performed, counseling providedSDOHCC Procedure
GroupPatient cohortsPatients with food insecurity in ZIP code 02134SDOHCC Group

SDOH Screening Tools and FHIR Mapping

The two most widely adopted SDOH screening tools are the AHC HRSN (Accountable Health Communities Health-Related Social Needs) screening tool and PRAPARE (Protocol for Responding to and Assessing Patients' Assets, Risks, and Experiences).

AHC HRSN Screening Tool

The CMS-developed AHC HRSN tool screens for five core domains and has standard LOINC panel codes:

DomainLOINC Panel CodeSample QuestionAnswer Coding
Food Insecurity88122-7"Within the past 12 months, you worried that your food would run out before you got money to buy more"LA28397-0 (Often true), LA6729-3 (Never true)
Housing Instability71802-3"What is your housing situation today?"LA31993-1 (I have housing), LA31994-9 (I do not have housing)
Transportation93030-5"Has lack of transportation kept you from medical appointments?"LA33-6 (Yes), LA32-8 (No)
Utility Needs93031-3"In the past 12 months, has your utility company shut off service?"LA33-6 (Yes), LA32-8 (No)
Interpersonal Safety93038-8"How often does anyone physically hurt you?"LA6568-5 (Never), LA10066-1 (Sometimes)

Representing Screening Responses as FHIR Observations

{
  "resourceType": "Observation",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-ObservationScreeningResponse"
    ]
  },
  "status": "final",
  "category": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "social-history",
          "display": "Social History"
        }
      ]
    },
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/observation-category",
          "code": "survey",
          "display": "Survey"
        }
      ]
    },
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes",
          "code": "food-insecurity",
          "display": "Food Insecurity"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "88122-7",
        "display": "Within the past 12 months, you worried that your food would run out"
      }
    ]
  },
  "subject": {
    "reference": "Patient/patient-john-smith"
  },
  "effectiveDateTime": "2026-03-16T10:30:00Z",
  "valueCodeableConcept": {
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "LA28397-0",
        "display": "Often true"
      }
    ]
  },
  "derivedFrom": [
    {
      "reference": "QuestionnaireResponse/ahc-hrsn-response-001"
    }
  ]
}

From Screening to Diagnosis: SDOH Conditions

When a screening identifies a social need, the next step is documenting it as a FHIR Condition using SDOH-specific SNOMED CT and ICD-10-CM codes.

SDOH Condition Codes

SDOH DomainSNOMED CT CodeICD-10-CM CodeDisplay Name
Food Insecurity733423003Z59.41Food insecurity
Homelessness32911000Z59.00Homelessness
Housing Instability611801000124106Z59.811Housing instability
Transportation Insecurity551411000124101Z59.82Transportation insecurity
Social Isolation422650009Z60.2Social isolation
Inadequate Access to Healthcare423315002Z75.3Unavailability of health care facilities
Financial Insecurity454061000124102Z59.86Financial insecurity

FHIR Condition Example

{
  "resourceType": "Condition",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-Condition"
    ]
  },
  "clinicalStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
        "code": "active"
      }
    ]
  },
  "verificationStatus": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
        "code": "confirmed"
      }
    ]
  },
  "category": [
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/us/core/CodeSystem/condition-category",
          "code": "health-concern",
          "display": "Health Concern"
        }
      ]
    },
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes",
          "code": "food-insecurity",
          "display": "Food Insecurity"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "733423003",
        "display": "Food insecurity"
      },
      {
        "system": "http://hl7.org/fhir/sid/icd-10-cm",
        "code": "Z59.41",
        "display": "Food insecurity"
      }
    ]
  },
  "subject": {
    "reference": "Patient/patient-john-smith"
  },
  "onsetDateTime": "2026-03-16",
  "asserter": {
    "reference": "Practitioner/dev-practitioner"
  },
  "evidence": [
    {
      "detail": [
        {
          "reference": "Observation/ahc-hrsn-food-screening-001"
        }
      ]
    }
  ]
}

The Referral Workflow: ServiceRequest, Task, and Community Integration

Identifying an SDOH need is only the beginning. The clinical value comes from connecting patients to community resources — food banks, housing assistance programs, transportation services — and tracking whether those referrals result in improved outcomes.

ServiceRequest: Making the Referral

{
  "resourceType": "ServiceRequest",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-ServiceRequest"
    ]
  },
  "status": "active",
  "intent": "order",
  "category": [
    {
      "coding": [
        {
          "system": "http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes",
          "code": "food-insecurity",
          "display": "Food Insecurity"
        }
      ]
    }
  ],
  "code": {
    "coding": [
      {
        "system": "http://snomed.info/sct",
        "code": "467771000124109",
        "display": "Assistance with application for food assistance program"
      }
    ]
  },
  "subject": {
    "reference": "Patient/patient-john-smith"
  },
  "requester": {
    "reference": "Practitioner/dev-practitioner"
  },
  "performer": [
    {
      "reference": "Organization/local-food-bank-org"
    }
  ],
  "reasonReference": [
    {
      "reference": "Condition/food-insecurity-condition-001"
    }
  ],
  "occurrencePeriod": {
    "start": "2026-03-16",
    "end": "2026-06-16"
  },
  "note": [
    {
      "text": "Patient reports running out of food regularly. Referred for SNAP enrollment assistance and food pantry access."
    }
  ]
}

Task: Tracking Referral Progress

The Task resource tracks the lifecycle of an SDOH referral from creation to completion:

{
  "resourceType": "Task",
  "meta": {
    "profile": [
      "http://hl7.org/fhir/us/sdoh-clinicalcare/StructureDefinition/SDOHCC-TaskForReferralManagement"
    ]
  },
  "status": "in-progress",
  "intent": "order",
  "code": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/CodeSystem/task-code",
        "code": "fulfill",
        "display": "Fulfill the focal request"
      }
    ]
  },
  "focus": {
    "reference": "ServiceRequest/sdoh-referral-food-001"
  },
  "for": {
    "reference": "Patient/patient-john-smith"
  },
  "requester": {
    "reference": "Organization/requesting-clinic"
  },
  "owner": {
    "reference": "Organization/local-food-bank-org"
  },
  "businessStatus": {
    "text": "Patient contacted, appointment scheduled for 2026-03-22"
  },
  "authoredOn": "2026-03-16T11:00:00Z",
  "lastModified": "2026-03-17T09:15:00Z",
  "output": [
    {
      "type": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes",
            "code": "resulting-activity",
            "display": "Resulting Activity"
          }
        ]
      },
      "valueReference": {
        "reference": "Procedure/snap-enrollment-procedure-001"
      }
    }
  ]
}

Community Referral Platform Integration

The Gravity Project defines a Coordination Platform (CP) architecture that connects healthcare organizations with community-based organizations (CBOs). Several platforms implement this pattern:

  • Unite Us — Largest closed-loop referral network with FHIR API integration
  • Aunt Bertha (findhelp) — Community resource directory with referral tracking
  • NowPow — Prescription-based social care referral platform
  • 211/AIRS — National community resource information network

Integration Pattern

"""SDOH referral workflow implementation."""
import json
import requests
from datetime import datetime

class SDOHReferralManager:
    def __init__(self, fhir_base_url, auth_token):
        self.fhir_url = fhir_base_url.rstrip("/")
        self.headers = {
            "Authorization": f"Bearer {auth_token}",
            "Content-Type": "application/fhir+json",
            "Accept": "application/fhir+json",
        }

    def create_screening_observations(self, patient_id, screening_responses):
        """Create FHIR Observations from screening tool responses."""
        observations = []
        for response in screening_responses:
            obs = {
                "resourceType": "Observation",
                "status": "final",
                "category": [
                    {
                        "coding": [{
                            "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                            "code": "social-history"
                        }]
                    },
                    {
                        "coding": [{
                            "system": "http://terminology.hl7.org/CodeSystem/observation-category",
                            "code": "survey"
                        }]
                    }
                ],
                "code": {
                    "coding": [{
                        "system": "http://loinc.org",
                        "code": response["loinc_code"],
                        "display": response["question"]
                    }]
                },
                "subject": {"reference": f"Patient/{patient_id}"},
                "effectiveDateTime": datetime.utcnow().isoformat() + "Z",
                "valueCodeableConcept": {
                    "coding": [{
                        "system": "http://loinc.org",
                        "code": response["answer_code"],
                        "display": response["answer_display"]
                    }]
                }
            }
            resp = requests.post(
                f"{self.fhir_url}/Observation",
                json=obs, headers=self.headers
            )
            resp.raise_for_status()
            observations.append(resp.json())
        return observations

    def create_sdoh_condition(self, patient_id, domain, snomed_code,
                              snomed_display, evidence_obs_ids):
        """Create an SDOH Condition from screening results."""
        condition = {
            "resourceType": "Condition",
            "clinicalStatus": {
                "coding": [{"system": "http://terminology.hl7.org/CodeSystem/condition-clinical", "code": "active"}]
            },
            "verificationStatus": {
                "coding": [{"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code": "confirmed"}]
            },
            "category": [
                {"coding": [{"system": "http://hl7.org/fhir/us/core/CodeSystem/condition-category", "code": "health-concern"}]},
                {"coding": [{"system": "http://hl7.org/fhir/us/sdoh-clinicalcare/CodeSystem/SDOHCC-CodeSystemTemporaryCodes", "code": domain}]}
            ],
            "code": {
                "coding": [{
                    "system": "http://snomed.info/sct",
                    "code": snomed_code,
                    "display": snomed_display
                }]
            },
            "subject": {"reference": f"Patient/{patient_id}"},
            "onsetDateTime": datetime.utcnow().strftime("%Y-%m-%d"),
            "evidence": [
                {"detail": [{"reference": f"Observation/{obs_id}"}]}
                for obs_id in evidence_obs_ids
            ]
        }
        resp = requests.post(
            f"{self.fhir_url}/Condition",
            json=condition, headers=self.headers
        )
        resp.raise_for_status()
        return resp.json()

    def create_referral(self, patient_id, condition_id,
                        service_snomed, service_display, performer_org_id):
        """Create a ServiceRequest referral to a community org."""
        service_request = {
            "resourceType": "ServiceRequest",
            "status": "active",
            "intent": "order",
            "code": {
                "coding": [{
                    "system": "http://snomed.info/sct",
                    "code": service_snomed,
                    "display": service_display
                }]
            },
            "subject": {"reference": f"Patient/{patient_id}"},
            "performer": [{"reference": f"Organization/{performer_org_id}"}],
            "reasonReference": [{"reference": f"Condition/{condition_id}"}],
        }
        resp = requests.post(
            f"{self.fhir_url}/ServiceRequest",
            json=service_request, headers=self.headers
        )
        resp.raise_for_status()
        return resp.json()

    def track_referral(self, task_id, new_status, business_status_text=None):
        """Update the status of a referral Task."""
        updates = {"status": new_status}
        if business_status_text:
            updates["businessStatus"] = {"text": business_status_text}
        updates["lastModified"] = datetime.utcnow().isoformat() + "Z"

        resp = requests.patch(
            f"{self.fhir_url}/Task/{task_id}",
            json=updates, headers=self.headers
        )
        resp.raise_for_status()
        return resp.json()

Patient Consent for SDOH Data Sharing

SDOH data is sensitive. A patient's food insecurity status or housing situation is personal information that they may not want shared broadly. The Gravity Project defines a Consent resource specifically for SDOH data sharing:

{
  "resourceType": "Consent",
  "status": "active",
  "scope": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/consentscope",
        "code": "patient-privacy"
      }
    ]
  },
  "category": [
    {
      "coding": [
        {
          "system": "http://loinc.org",
          "code": "59284-0",
          "display": "Consent Document"
        }
      ]
    }
  ],
  "patient": {
    "reference": "Patient/patient-john-smith"
  },
  "dateTime": "2026-03-16T10:45:00Z",
  "performer": [
    {
      "reference": "Patient/patient-john-smith"
    }
  ],
  "organization": [
    {
      "reference": "Organization/requesting-clinic"
    }
  ],
  "provision": {
    "type": "permit",
    "period": {
      "start": "2026-03-16",
      "end": "2027-03-16"
    },
    "actor": [
      {
        "role": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
              "code": "IRCP",
              "display": "information recipient"
            }
          ]
        },
        "reference": {
          "reference": "Organization/local-food-bank-org"
        }
      }
    ],
    "action": [
      {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/consentaction",
            "code": "access"
          }
        ]
      }
    ],
    "class": [
      {
        "system": "http://hl7.org/fhir/resource-types",
        "code": "Condition"
      },
      {
        "system": "http://hl7.org/fhir/resource-types",
        "code": "ServiceRequest"
      }
    ]
  }
}

Quality Measures and Reporting

CMS quality programs are increasingly incorporating SDOH measures. HEDIS 2024+ includes SDOH screening measures, and CMS's health equity strategy prioritizes SDOH data collection:

  • HEDIS Social Need Screening and Intervention — Percentage of members screened for food insecurity, housing instability, transportation, utility, and interpersonal safety needs
  • CMS Hospital Quality Reporting — Screen for SDOH needs and document in a structured format
  • MIPS Quality Measures — SDOH screening is included in multiple MIPS quality measure specifications

For validating that SDOH FHIR resources conform to the Gravity Project profiles, our guide on FHIR resource validation covers the profile validation layer needed for IG conformance.

 

Ready to scale?

Talk to our healthcare engineering team about building, integrating, and shipping faster.

Frequently Asked Questions

What are Social Determinants of Health (SDOH) in FHIR?

SDOH in FHIR refers to the structured representation of social factors affecting health — food insecurity, housing instability, transportation barriers, social isolation, and interpersonal safety — using standard FHIR resources. The Gravity Project HL7 Implementation Guide defines specific FHIR profiles for Observation (screening responses), Condition (SDOH diagnoses), Goal (improvement targets), ServiceRequest (community referrals), and Task (referral tracking). Data is coded using SDOH-specific SNOMED CT, ICD-10-CM, and LOINC codes.

What is the Gravity Project?

The Gravity Project is an HL7 FHIR Accelerator initiative focused on standardizing SDOH data exchange in healthcare. It convenes 2,500+ stakeholders from healthcare, social services, government, and technology to define consensus-based data standards. The project produces an HL7 FHIR Implementation Guide that specifies profiles, value sets, code systems, and workflows for SDOH clinical care. It's the authoritative standard referenced by CMS, ONC, and major EHR vendors.

What screening tools are used for SDOH in FHIR?

The two most widely adopted tools are the AHC HRSN (Accountable Health Communities Health-Related Social Needs) screening tool developed by CMS, and PRAPARE (Protocol for Responding to and Assessing Patients' Assets, Risks, and Experiences) developed by NACHC. Both have standardized LOINC codes for questions and answers, enabling structured representation as FHIR Observations. PHQ-2/PHQ-9 for depression screening is also commonly included in SDOH workflows.

How do I code SDOH conditions in FHIR?

SDOH conditions use specific SNOMED CT and ICD-10-CM codes. For example: food insecurity is SNOMED 733423003 / ICD-10 Z59.41, homelessness is SNOMED 32911000 / ICD-10 Z59.00, transportation insecurity is SNOMED 551411000124101 / ICD-10 Z59.82. These are documented in the Gravity Project value sets. The FHIR Condition resource uses the SDOHCC Condition profile with both a health-concern category and an SDOH domain category.  

How do community referrals work in FHIR?

Community referrals use a ServiceRequest + Task pattern. The healthcare organization creates a ServiceRequest (the referral) pointing to the SDOH Condition as the reason and the community-based organization (CBO) as the performer. A Task resource tracks the referral lifecycle: the CBO accepts the Task, updates its status as they engage with the patient, and marks it completed when services are delivered. Closed-loop referral platforms (Unite Us, findhelp) implement this FHIR-based workflow.  

Is SDOH screening required by CMS?

CMS is progressively mandating SDOH screening. HEDIS 2024+ includes SDOH screening measures for Medicaid and Medicare Advantage plans. CMS's Health Equity strategy includes SDOH data collection requirements. The CMS Innovation Center's ACO REACH model requires SDOH screening. While universal SDOH screening is not yet mandated for all providers, the regulatory trajectory is clear — and structured FHIR-based documentation positions organizations for compliance as requirements expand.
Share