Skip to content

End to End Submission Flow

Sarah McDougall edited this page Dec 26, 2021 · 6 revisions

Systems in End to End Submission Flow

  • Client: Gathers data of interest, then assembles and executes submit-data request
  • EHR: Data source for Client, implements FHIR API that supports query parameters needed to gather data of interest
  • Receiving Server: Receives and stores data of interest, calculates measures and care gap reports
  • Auth Server: OAuth2 implementation to provide access control for Receiving Server
  • Program Server: Provides functionality related to a specific quality program

The submit-data operation

The client executes the submit-data FHIR operation, which submits data-of-interest for a measure. Check out the operation spec for more information and examples.

Workflow

Client Workflow

  1. Client queries $data-requirements endpoint for Measure
  • Receiving Server returns Library with populated dataRequirement
  1. Client creates queries from Library.dataRequirement, and queries EHR for data of interest
  • EHR processes queries and returns data needed
  1. Client creates MeasureReport, Provenance resource (w/empty target)
  2. Client creates Parameters resource with embedded MeasureReport, resources
  3. Client authenticates with Auth Server, and receives an authorization token
  4. Client executes $submit-data on Receiving System with Parameters resource, X-Provenance header, and authorization token

Server Workflow

  1. Receiving Server receives Parameters, X-Provenance and authorization token from Client
  2. Receiving Server verifies user authorization with Auth server using authorization token
  • Creates AuditEvent with record of success/failure of authorization
  1. Receiving Server sends credentials to Program Server, to verify that user may submit AND is authorized to submit on behalf of an Organization
  • (TODO More detail on this handshake)
  • Creates AuditEvent with record of success/failure of program authorization
  1. On Success, Receiving Server extracts data from Parameters.parameter resource and persists into database for the Organization that was authorized in Step #9
  • CreatesProvenance resource, linked to all resources that were persisted
  • Creates AuditEvent resource, linked to all resources that were persisted
  1. Receiving Server returns 200 Success to the Client, along with X-Provenance header in response using Provenance resource created in Step #10

Submission Flow Example using EXM130 Measure Bundle

To perform end to end submission flow, we will begin by EXM130 measure bundle. See Measure Bundle Upload for detailed instructions on sending the measure to the server.

After uploading the measure bundle, submit the following POST request:

POST http://localhost:3000/4_0_1/Measure/measure-EXM130-7.3.000/$submit-data

with the following JSON body:

{
  "resourceType": "Parameters",
  "parameter": [
    {
      "name": "measureReport",
      "resource": {
		  "resourceType": "MeasureReport",
		  "status": "complete",
		  "type": "data-collection",
		  "measure": "Measure/measure-mrp",
		  "patient": {
			"reference": "Patient/Practitioner-2178"
		  },
		  "period": {
			"start": "2017-01-01T00:00:00+00:00",
			"end": "2017-12-31T00:00:00+00:00"
		  },
		  "evaluatedResource": [
			  {
				"reference": "Patient/Practitioner-2178"
			  },
			  {
				"reference": "Encounter/Encounter-62912"
			  },
			  {
				"reference": "Procedure/Procedure-89972"
			  }
		  ]
		}
	},
	{
      "name": "resource",
      "resource": {
        "resourceType": "Patient",
        "id": "Practitioner-2178",
        "meta": {
          "versionId": "8",
          "lastUpdated": "2018-05-31T07:15:08.000+00:00",
          "profile": [
            "http://hl7.org/fhir/us/hedis/StructureDefinition/hedis-patient"
          ]
        },
        "text": {
          "status": "generated",
          "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><div class=\"hapiHeaderText\">Natalie Huff <b>WALTER </b></div><table class=\"hapiPropertyTable\"><tbody><tr><td>Identifier</td><td>000002418</td></tr><tr><td>Address</td><td><span>623 SW French Place </span><br/><span>Westland </span><span>MI </span></td></tr><tr><td>Date of birth</td><td><span>26 July 1974</span></td></tr></tbody></table></div>"
        },
        "extension": [
          {
            "url": "http://mihin.org/extension/copyright",
            "valueString": "Copyright 2014-2017 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you can not use this file except in compliance with the License. You can obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
          },
          {
            "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://hl7.org/fhir/v3/Race",
                  "code": "2106-3",
                  "display": "White"
                }
              ]
            }
          },
          {
            "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://hl7.org/fhir/v3/Ethnicity",
                  "code": "2186-5",
                  "display": "Not Hispanic or Latino"
                }
              ]
            }
          },
          {
            "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-religion",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://hl7.org/fhir/v3/ReligiousAffiliation",
                  "code": "1020",
                  "display": "Hinduism"
                }
              ]
            }
          }
        ],
        "identifier": [
          {
            "use": "official",
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "SB",
                  "display": "Social Beneficiary Identifier"
                }
              ],
              "text": "US Social Security Number"
            },
            "system": "http://hl7.org/fhir/sid/us-ssn",
            "value": "000002418"
          }
        ],
        "active": true,
        "name": [
          {
            "family": "Walter",
            "given": [
              "Natalie",
              "Huff"
            ]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "248-555-3608",
            "use": "home"
          },
          {
            "system": "phone",
            "value": "248-555-4649",
            "use": "mobile"
          }
        ],
        "gender": "female",
        "birthDate": "1974-07-26",
        "address": [
          {
            "use": "home",
            "type": "postal",
            "line": [
              "623 SW French Place"
            ],
            "city": "Westland",
            "district": "Wayne County",
            "state": "MI",
            "postalCode": "48185"
          }
        ]
      }
    },
    {
      "name": "resource",
      "resource": {
        "resourceType": "Encounter",
        "id": "Encounter-62912",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2018-05-31T08:21:50.000+00:00",
          "profile": [
            "http://hl7.org/fhir/us/hedis/StructureDefinition/hedis-encounter"
          ]
        },
        "extension": [
          {
            "url": "http://mihin.org/extension/copyright",
            "valueString": "Copyright 2014-2017 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you can not use this file except in compliance with the License. You can obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
          }
        ],
        "status": "finished",
        "class": {
          "system": "http://hl7.org/fhir/encounter-class",
          "code": "inpatient",
          "display": "Inpatient"
        },
        "type": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "56876005",
                "display": "Drug rehabilitation and detoxification"
              }
            ]
          }
        ],
        "subject": {
          "reference": "Patient/Practitioner-2178",
          "display": "Natalie Huff Walter"
        },
        "period": {
          "start": "2018-05-29T11:00:00-04:00",
          "end": "2018-05-29T11:00:00-04:00"
        },
        "hospitalization": {
          "dischargeDisposition": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/discharge-disposition",
                "code": "home",
                "display": "Home"
              }
            ]
          }
        }
      }
    },
    {
      "name": "resource",
      "resource": {
        "resourceType": "Procedure",
        "id": "Procedure-89972",
        "meta": {
          "versionId": "1",
          "lastUpdated": "2018-05-30T23:56:19.000+00:00",
          "profile": [
            "http://hl7.org/fhir/us/hedis/StructureDefinition/hedis-procedure"
          ]
        },
        "extension": [
          {
            "url": "http://mihin.org/extension/copyright",
            "valueString": "Copyright 2014-2017 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you can not use this file except in compliance with the License. You can obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0.  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
          }
        ],
        "identifier": [
          {
            "system": "mihin.org/fhir/sid/elementId",
            "value": "ca097928-b18c-406c-a01b-6ad4a321fc28"
          }
        ],
        "status": "completed",
        "code": {
          "coding": [
            {
              "system": "http://www.ama-assn.org/go/cpt",
              "code": "1111F",
              "display": "Medication reconciliation postdischarge"
            }
          ]
        },
        "subject": {
          "reference": "Patient/Practitioner-2178",
          "display": "Natalie Huff Walter"
        },
        "performedPeriod": {
          "start": "2018-06-02T14:00:00-05:00",
          "end": "2018-06-02T14:00:00-05:00"
        }
      }
    },
		{
     "name": "exportUrl",
     "valueString": "https://example-export.com"
}
  ]
}