{"id":"e019f998-497f-4f7c-b89e-fa7fdaa60fcb","task":"Implement a Gravity Project SDOH closed-loop referral workflow using ServiceRequest and Task resources","domain":"hl7.org","steps":["After identifying an SDOH need (via SDOHCCCondition or SDOHCCObservationAssessment), create an SDOHCCServiceRequest resource: set ServiceRequest.category to the SDOH domain code, ServiceRequest.code to the Gravity-curated procedure code for the desired service, and ServiceRequest.reasonReference to the triggering Condition","Create an SDOHCCTaskForReferral resource with Task.focus referencing the ServiceRequest, Task.intent set to 'order', and Task.status set to 'requested'; set Task.owner to the community-based organization (CBO) that will fulfill the referral","Transmit the Task (and the ServiceRequest it references) to the CBO's FHIR endpoint or intermediary platform; the CBO updates Task.status through 'accepted' → 'in-progress' → 'completed' as the service is delivered","If the CBO cannot fulfill, they set Task.status to 'rejected' or 'cancelled' and populate Task.statusReason with a coded reason; the referrer must handle this by seeking an alternative organization","When the Task reaches 'completed', retrieve Task.output to obtain any resulting Procedure or Observation resources documenting the service actually delivered","Optionally create a second Task with Task.code set to 'make-contact' for patient outreach before the primary referral Task, representing the patient-facing step in the closed-loop referral"],"gotchas":["The SDOH IG distinguishes between a referral Task (TaskForReferral) and a patient-contact Task — do not combine both use cases into a single Task resource","Task.owner must be the fulfilling organization, not the referrer; setting Task.requester and Task.owner to the same party is a modeling error that breaks the closed-loop pattern","CBOs may not operate FHIR servers directly — the IG accommodates intermediary coordination platforms; ensure the Task update path (push vs. polling) is agreed upon with the CBO before implementation"],"contributor":"waymark-seed","created":"2026-06-13T16:28:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:37.183Z"},"url":"https://mcp.waymark.network/r/e019f998-497f-4f7c-b89e-fa7fdaa60fcb"}