From f431b035f0bd13dbdf1bec2dee1a79cbea2279bf Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Thu, 5 Oct 2023 11:35:42 -0700 Subject: [PATCH 1/2] wip, contained resource extraction. --- .../base/fhir401_extract_resource_metadata.go | 55 +++++++++++++++---- clients/models/resource.go | 7 ++- go.mod | 2 + go.sum | 2 - 4 files changed, 51 insertions(+), 15 deletions(-) diff --git a/clients/internal/base/fhir401_extract_resource_metadata.go b/clients/internal/base/fhir401_extract_resource_metadata.go index 39a6a1f48..daa67cd4b 100644 --- a/clients/internal/base/fhir401_extract_resource_metadata.go +++ b/clients/internal/base/fhir401_extract_resource_metadata.go @@ -23,6 +23,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc switch sourceResourceTyped := resourceRaw.(type) { case fhir401.AllergyIntolerance: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code != nil && len(sourceResourceTyped.Code.Coding) > 0 && sourceResourceTyped.Code.Coding[0].Display != nil { sortTitle = sourceResourceTyped.Code.Coding[0].Display } @@ -68,6 +69,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.CarePlan: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Title != nil { sortTitle = sourceResourceTyped.Title @@ -232,6 +234,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.CareTeam: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Name != nil { sortTitle = sourceResourceTyped.Name @@ -293,6 +296,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Condition: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code != nil && len(sourceResourceTyped.Code.Coding) > 0 && sourceResourceTyped.Code.Coding[0].Display != nil { sortTitle = sourceResourceTyped.Code.Coding[0].Display @@ -363,6 +367,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Coverage: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Class) > 0 && sourceResourceTyped.Class[0].Name != nil { sortTitle = sourceResourceTyped.Class[0].Name @@ -401,6 +406,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Device: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.DeviceName) > 0 { sortTitle = &sourceResourceTyped.DeviceName[0].Name @@ -427,6 +433,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.DiagnosticReport: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code.Text != nil { sortTitle = sourceResourceTyped.Code.Text @@ -536,6 +543,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.DocumentReference: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Category) > 0 && sourceResourceTyped.Category[0].Text != nil { sortTitle = sourceResourceTyped.Category[0].Text @@ -629,6 +637,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Encounter: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Type) > 0 && sourceResourceTyped.Type[0].Text != nil { sortTitle = sourceResourceTyped.Type[0].Text @@ -752,13 +761,19 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.ExplanationOfBenefit: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Diagnosis != nil && len(sourceResourceTyped.Diagnosis) > 0 { - if sourceResourceTyped.Diagnosis[0].DiagnosisCodeableConcept.Text != nil { - sortTitle = sourceResourceTyped.Diagnosis[0].DiagnosisCodeableConcept.Text - } else if sourceResourceTyped.Diagnosis[0].DiagnosisReference.Display != nil { - sortTitle = sourceResourceTyped.Diagnosis[0].DiagnosisReference.Display + for rndx, _ := range sourceResourceTyped.Diagnosis { + if sourceResourceTyped.Diagnosis[rndx].DiagnosisCodeableConcept.Text != nil { + sortTitle = sourceResourceTyped.Diagnosis[rndx].DiagnosisCodeableConcept.Text + break + } else if sourceResourceTyped.Diagnosis[rndx].DiagnosisReference.Display != nil { + sortTitle = sourceResourceTyped.Diagnosis[rndx].DiagnosisReference.Display + break + } } + } else if sourceResourceTyped.Type.Text != nil { sortTitle = sourceResourceTyped.Type.Text } else if len(sourceResourceTyped.Type.Coding) > 0 && sourceResourceTyped.Type.Coding[0].Display != nil { @@ -928,6 +943,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.FamilyMemberHistory: + resource.ContainedResources = sourceResourceTyped.Contained + if sourceResourceTyped.Name != nil { sortTitle = sourceResourceTyped.Name } else if sourceResourceTyped.Relationship.Text != nil { @@ -959,8 +976,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } } } - case fhir401.Goal: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Note) > 0 { sortTitle = &sourceResourceTyped.Note[0].Text @@ -1000,6 +1017,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Immunization: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.VaccineCode.Text != nil { sortTitle = sourceResourceTyped.VaccineCode.Text @@ -1083,6 +1101,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Location: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Name != nil { sortTitle = sourceResourceTyped.Name @@ -1113,6 +1132,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Media: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Type != nil && sourceResourceTyped.Type.Text != nil { sortTitle = sourceResourceTyped.Type.Text @@ -1161,6 +1181,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Medication: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code != nil && sourceResourceTyped.Code.Text != nil { sortTitle = sourceResourceTyped.Code.Text @@ -1177,6 +1198,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.MedicationRequest: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Identifier) > 0 && sourceResourceTyped.Identifier[0].Value != nil { sortTitle = sourceResourceTyped.Identifier[0].Value @@ -1285,6 +1307,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.MedicationDispense: + resource.ContainedResources = sourceResourceTyped.Contained + if sourceResourceTyped.MedicationCodeableConcept.Text != nil { sortTitle = sourceResourceTyped.MedicationCodeableConcept.Text } else if len(sourceResourceTyped.MedicationCodeableConcept.Coding) > 0 && sourceResourceTyped.MedicationCodeableConcept.Coding[0].Display != nil { @@ -1405,8 +1429,9 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } } } - case fhir401.NutritionOrder: + resource.ContainedResources = sourceResourceTyped.Contained + if sourceResourceTyped.FoodPreferenceModifier != nil && len(sourceResourceTyped.FoodPreferenceModifier) > 0 { sortTitle = sourceResourceTyped.FoodPreferenceModifier[0].Text } @@ -1439,8 +1464,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } } } - case fhir401.Observation: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code.Text != nil { sortTitle = sourceResourceTyped.Code.Text @@ -1526,6 +1551,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Organization: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Name != nil { sortTitle = sourceResourceTyped.Name @@ -1547,6 +1573,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Patient: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Name) > 0 && sourceResourceTyped.Name[0].Text != nil { sortTitle = sourceResourceTyped.Name[0].Text @@ -1596,6 +1623,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Practitioner: + resource.ContainedResources = sourceResourceTyped.Contained if len(sourceResourceTyped.Name) > 0 && sourceResourceTyped.Name[0].Text != nil { sortTitle = sourceResourceTyped.Name[0].Text @@ -1626,6 +1654,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.PractitionerRole: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Practitioner != nil && sourceResourceTyped.Practitioner.Display != nil { sortTitle = sourceResourceTyped.Practitioner.Display @@ -1671,6 +1700,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Procedure: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code != nil && sourceResourceTyped.Code.Text != nil { sortTitle = sourceResourceTyped.Code.Text @@ -1762,6 +1792,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.Provenance: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Activity != nil && sourceResourceTyped.Activity.Text != nil { sortTitle = sourceResourceTyped.Activity.Text @@ -1810,6 +1841,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.RelatedPerson: + resource.ContainedResources = sourceResourceTyped.Contained + if len(sourceResourceTyped.Name) > 0 && sourceResourceTyped.Name[0].Text != nil { sortTitle = sourceResourceTyped.Name[0].Text } else if len(sourceResourceTyped.Name) > 0 && len(sourceResourceTyped.Name[0].Given) > 0 && sourceResourceTyped.Name[0].Family != nil { @@ -1835,6 +1868,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc break case fhir401.ServiceRequest: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.Code != nil && sourceResourceTyped.Code.Text != nil { sortTitle = sourceResourceTyped.Code.Text @@ -1955,6 +1989,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } break case fhir401.Specimen: + resource.ContainedResources = sourceResourceTyped.Contained if sourceResourceTyped.ReceivedTime != nil { sortDate = sourceResourceTyped.ReceivedTime @@ -2009,8 +2044,8 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc } -//normalizeReference takes a reference string and returns a normalized reference string -//FHIR references come in multiple forms: +// normalizeReference takes a reference string and returns a normalized reference string +// FHIR references come in multiple forms: // // [id] the logical [id] of a resource using a local reference (i.e. a relative reference). // [type]/[id] the logical [id] of a resource of a specified type using a local reference (i.e. a relative reference), for when the reference can point to different types of resources (e.g. Observation.subject). @@ -2061,7 +2096,7 @@ func removeDuplicateStr(strSlice []string) []string { return list } -//attempt to parse datetime with RFC3339, +// attempt to parse datetime with RFC3339, // if that fails, attempt to parse without seconds // if that fails, attempt to parse without time func parseDateTimeWithFallback(dateTime *string) *time.Time { diff --git a/clients/models/resource.go b/clients/models/resource.go index 853298ce1..2b97c5b1d 100644 --- a/clients/models/resource.go +++ b/clients/models/resource.go @@ -15,9 +15,10 @@ type RawResourceFhir struct { SourceResourceID string `json:"source_resource_id"` ResourceRaw json.RawMessage `json:"resource_raw"` - SortTitle *string `json:"sort_title"` - SortDate *time.Time `json:"sort_date"` - ReferencedResources []string `json:"referenced_resources"` + SortTitle *string `json:"sort_title"` + SortDate *time.Time `json:"sort_date"` + ReferencedResources []string `json:"referenced_resources"` + ContainedResources []json.RawMessage `json:"contained,omitempty"` SourceUri string `json:"source_uri"` //this is the location the resource was requested from in the source system. It should be the canonical url of the resource } diff --git a/go.mod b/go.mod index 3ea66fd26..b7c7397bb 100644 --- a/go.mod +++ b/go.mod @@ -24,3 +24,5 @@ require ( google.golang.org/protobuf v1.28.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/fastenhealth/gofhir-models => ../gofhir-models diff --git a/go.sum b/go.sum index 7c7803024..5a321099c 100644 --- a/go.sum +++ b/go.sum @@ -1,8 +1,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/fastenhealth/gofhir-models v0.0.5 h1:wU2Dz+/h9MzZCTRgkQzeq5l0EFuMI6C5xgCbKislFpg= -github.com/fastenhealth/gofhir-models v0.0.5/go.mod h1:xB8ikGxu3bUq2b1JYV+CZpHqBaLXpOizFR0eFBCunis= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= From 7db880e31b04e4a2d6166ced240d72c022f488aa Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Thu, 5 Oct 2023 18:39:24 -0700 Subject: [PATCH 2/2] wip, contained resource extraction. --- clients/internal/base/fhir401_client.go | 67 +- clients/internal/base/fhir401_client_test.go | 61 + .../base/fhir401_extract_resource_metadata.go | 22 +- .../fhir401_extract_resource_metadata_test.go | 29 +- .../document_reference/medicare-eob.json | 6882 +++++++++++++++++ clients/models/mock/mock_resource.go | 15 + clients/models/mock/mock_source_client.go | 7 +- clients/models/resource.go | 1 + go.mod | 4 +- go.sum | 2 + 10 files changed, 7066 insertions(+), 24 deletions(-) create mode 100644 clients/internal/base/testdata/fixtures/401-R4/document_reference/medicare-eob.json diff --git a/clients/internal/base/fhir401_client.go b/clients/internal/base/fhir401_client.go index 3b06d826d..beb2111ab 100644 --- a/clients/internal/base/fhir401_client.go +++ b/clients/internal/base/fhir401_client.go @@ -30,9 +30,9 @@ func GetSourceClientFHIR401(env pkg.FastenLighthouseEnvType, ctx context.Context }, err } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Sync -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// func (c *SourceClientFHIR401) SyncAll(db models.DatabaseRepository) (models.UpsertSummary, error) { bundle, err := c.GetPatientBundle(c.SourceCredential.GetPatientId()) if err != nil { @@ -243,9 +243,9 @@ func (c *SourceClientFHIR401) ProcessPendingResources(db models.DatabaseReposito return lookupResourceReferences, syncErrors } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // FHIR -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// func (c *SourceClientFHIR401) GetResourceBundle(relativeResourcePath string) (interface{}, error) { // https://www.hl7.org/fhir/patient-operation-everything.html @@ -322,9 +322,9 @@ func (c *SourceClientFHIR401) GetPatient(patientId string) (fhir401.Patient, err return patient, err } -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Process Bundles -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// func (c *SourceClientFHIR401) ProcessBundle(bundle fhir401.Bundle) ([]models.RawResourceFhir, map[string]string, error) { //bundles may contain references to resources in one of 3 formats: - https://www.hl7.org/fhir/references.html#literal @@ -345,12 +345,6 @@ func (c *SourceClientFHIR401) ProcessBundle(bundle fhir401.Bundle) ([]models.Raw //no resourceId present for this resource, we'll ignore it. return models.RawResourceFhir{}, false } - // TODO find a way to safely/consistently get the resource updated date (and other metadata) which shoudl be added to the model. - //if originalResource.Meta != nil && originalResource.Meta.LastUpdated != nil { - // if parsed, err := time.Parse(time.RFC3339Nano, *originalResource.Meta.LastUpdated); err == nil { - // patientProfile.UpdatedAt = parsed - // } - //} if bundleEntry.FullUrl != nil && strings.HasPrefix(*bundleEntry.FullUrl, "urn:uuid:") { internalFragmentReferenceLookup[*bundleEntry.FullUrl] = fmt.Sprintf("%s/%s", resourceType, *resourceId) @@ -367,10 +361,10 @@ func (c *SourceClientFHIR401) ProcessBundle(bundle fhir401.Bundle) ([]models.Raw return wrappedResourceModels, internalFragmentReferenceLookup, nil } -//process a resource by: -//- inserting into the database -//- increment the updatedResources list if the resource has been updated -//- extract all external references from the resource payload (adding the the lookup table) +// process a resource by: +// - inserting into the database +// - increment the updatedResources list if the resource has been updated +// - extract all external references from the resource payload (adding the the lookup table) func (c *SourceClientFHIR401) ProcessResource(db models.DatabaseRepository, resource models.RawResourceFhir, referencedResourcesLookup map[string]bool, internalFragmentReferenceLookup map[string]string, summary *models.UpsertSummary) error { referencedResourcesLookup[fmt.Sprintf("%s/%s", resource.SourceResourceType, resource.SourceResourceID)] = true if len(resource.SourceUri) > 0 { @@ -382,6 +376,47 @@ func (c *SourceClientFHIR401) ProcessResource(db models.DatabaseRepository, reso if err != nil { return err } + + resourceObjTyped := resourceObj.(models.ResourceInterface) + currentResourceType, currentResourceId := resourceObjTyped.ResourceRef() + + //before processing this resource, we should check if it has any contained resources that we need to process first (recursively) + containedResources := resourceObj.(models.ResourceInterface).ContainedResources() + if containedResources != nil && len(containedResources) > 0 { + for cndx, containedResource := range containedResources { + containedResourceObj, err := fhirutils.MapToResource(containedResource, false) + if err != nil { + c.Logger.Warnf("Skipping contained resource (index %d) in %s/%s: %v", cndx, currentResourceType, *currentResourceId, err.Error()) + continue + } + + containedResourceTyped := containedResourceObj.(models.ResourceInterface) + containedResourceType, containedResourceId := containedResourceTyped.ResourceRef() + if containedResourceId == nil { + //no id present for this contained resource, we'll ignore it. (since theres no way to reference it anyways) + c.Logger.Warnf("Skipping contained resource missing id: (%s/%s#%s index: %d)", currentResourceType, *currentResourceId, containedResourceType, cndx) + continue + } + normalizedContainedResourceId := normalizeContainedResourceId(currentResourceType, *currentResourceId, *containedResourceId) + + //generate a unique id for this contained resource by base64 url encoding this string + base64ContainedResourceId := base64.URLEncoding.EncodeToString([]byte(normalizedContainedResourceId)) + + //add this mapping to the internalFragmentReferenceLookup + internalFragmentReferenceLookup[normalizedContainedResourceId] = fmt.Sprintf("%s/%s", containedResourceType, base64ContainedResourceId) + + containedResourceWrapped := models.RawResourceFhir{ + SourceResourceID: base64ContainedResourceId, + SourceResourceType: containedResourceType, + ResourceRaw: containedResource, + } + err = c.ProcessResource(db, containedResourceWrapped, referencedResourcesLookup, internalFragmentReferenceLookup, summary) + if err != nil { + return err + } + } + } + SourceClientFHIR401ExtractResourceMetadata(resourceObj, &resource, internalFragmentReferenceLookup) isUpdated, err := db.UpsertRawResource(c.Context, c.SourceCredential, resource) diff --git a/clients/internal/base/fhir401_client_test.go b/clients/internal/base/fhir401_client_test.go index ed8cdd07c..9b255cab0 100644 --- a/clients/internal/base/fhir401_client_test.go +++ b/clients/internal/base/fhir401_client_test.go @@ -140,3 +140,64 @@ func TestFhir401Client_ProcessResource(t *testing.T) { }, referencedResourcesLookup) //require.Equal(t, "A00000000000005", profile.SourceResourceID) } + +func TestFhir401Client_ProcessResourceWithContainedResources(t *testing.T) { + t.Parallel() + //setup + mockCtrl := gomock.NewController(t) + defer mockCtrl.Finish() + sc := mock_models.NewMockSourceCredential(mockCtrl) + db := mock_models.NewMockDatabaseRepository(mockCtrl) + testLogger := logrus.WithFields(logrus.Fields{ + "type": "test", + }) + client, err := GetSourceClientFHIR401(pkg.FastenLighthouseEnvSandbox, context.Background(), testLogger, sc, &http.Client{}) + require.NoError(t, err) + db.EXPECT().UpsertRawResource(gomock.Any(), gomock.Any(), gomock.Any()).Return(true, nil).AnyTimes() + + jsonBytes, err := ReadTestFixture("testdata/fixtures/401-R4/document_reference/medicare-eob.json") + require.NoError(t, err) + referencedResourcesLookup := map[string]bool{} + internalFragmentReferenceLookup := map[string]string{} + summary := models.UpsertSummary{} + + rawResource := models.RawResourceFhir{ + SourceResourceID: "carrier--10000930037921", + SourceResourceType: "ExplanationOfBenefit", + ResourceRaw: jsonBytes, + } + + // test + err = client.ProcessResource(db, rawResource, referencedResourcesLookup, internalFragmentReferenceLookup, &summary) + + //assert + require.NoError(t, err) + require.Equal(t, 23, len(referencedResourcesLookup)) + //notice how the contained resources are tagged as completed in the referencedResourcesLookup + require.Equal(t, map[string]bool{ + "Coverage/part-b--10000010254618": false, + "ExplanationOfBenefit/carrier--10000930037921": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi00": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi01": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi02": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi03": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi04": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi05": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0x": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xMA==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xMQ==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xMg==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xMw==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xNA==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xNQ==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xNg==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xNw==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xOA==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0xOQ==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0y": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0yMA==": true, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvY2Fycmllci0tMTAwMDA5MzAwMzc5MjEjbGluZS1vYnNlcnZhdGlvbi0z": true, + "Patient/-10000010254618": false, + }, referencedResourcesLookup) + //require.Equal(t, "A00000000000005", profile.SourceResourceID) +} diff --git a/clients/internal/base/fhir401_extract_resource_metadata.go b/clients/internal/base/fhir401_extract_resource_metadata.go index daa67cd4b..3ef9e61ea 100644 --- a/clients/internal/base/fhir401_extract_resource_metadata.go +++ b/clients/internal/base/fhir401_extract_resource_metadata.go @@ -2030,7 +2030,7 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc //before storing resource references, we need to determine if any of them are internal bundle references, and replace them if so. for ndx, _ := range cleanResourceRefs { internalRef := cleanResourceRefs[ndx] - cleanResourceRefs[ndx] = normalizeReferenceId(internalRef, internalFragmentReferenceLookup) + cleanResourceRefs[ndx] = normalizeReferenceId(internalRef, internalFragmentReferenceLookup, resource) } resource.ReferencedResources = cleanResourceRefs @@ -2055,13 +2055,21 @@ func SourceClientFHIR401ExtractResourceMetadata(resourceRaw interface{}, resourc // // see https://build.fhir.org/search.html#reference // see https://build.fhir.org/references.html -func normalizeReferenceId(originalReference string, internalFragmentReferenceLookup map[string]string) string { +func normalizeReferenceId(originalReference string, internalFragmentReferenceLookup map[string]string, resource *models.RawResourceFhir) string { if strings.HasPrefix(originalReference, "urn:uuid:") { if relativeReference, relativeReferenceOk := internalFragmentReferenceLookup[originalReference]; relativeReferenceOk { //replace internal reference with relative reference return relativeReference } } + if strings.HasPrefix(originalReference, "#") { + //relative reference to internal fragment + normalizedContainedReference := normalizeContainedResourceId(resource.SourceResourceType, resource.SourceResourceID, originalReference) + if relativeReference, relativeReferenceOk := internalFragmentReferenceLookup[normalizedContainedReference]; relativeReferenceOk { + //replace contained relative reference with relative reference + return relativeReference + } + } // handle absolute urls if strings.HasPrefix(originalReference, "http://") || strings.HasPrefix(originalReference, "https://") { @@ -2117,3 +2125,13 @@ func parseDateTimeWithFallback(dateTime *string) *time.Time { } return &parsedDateTime } + +// we're going to generate a base64 url encoded string that is the concatenation of the parent resource type, parent resource id, and the contained resource id fragment +// this will be used as the key in the internalFragmentReferenceLookup map +// eg. ExplanationOfBenefits/1234 contains an Observation resource with id #5678 +// the key will be ExplanationOfBenefits/1234#5678 +func normalizeContainedResourceId(parentResourceType string, parentResourceId string, containedResourceIdFragment string) string { + //TODO: throw an error if the containedResourceIdFragment doesnt start with '#' + + return fmt.Sprintf("%s/%s#%s", parentResourceType, parentResourceId, strings.TrimPrefix(containedResourceIdFragment, "#")) +} diff --git a/clients/internal/base/fhir401_extract_resource_metadata_test.go b/clients/internal/base/fhir401_extract_resource_metadata_test.go index 003f2fd38..a8fbc7b69 100644 --- a/clients/internal/base/fhir401_extract_resource_metadata_test.go +++ b/clients/internal/base/fhir401_extract_resource_metadata_test.go @@ -1,6 +1,7 @@ package base import ( + "github.com/fastenhealth/fasten-sources/clients/models" "github.com/stretchr/testify/require" "testing" ) @@ -24,40 +25,66 @@ func TestNormalizeReferenceId(t *testing.T) { var tests = []struct { inputReferenceId string internalReferenceMap map[string]string + currentResource *models.RawResourceFhir expectedNormalizedReferenceId string }{ // the table itself { "urn:uuid:801922ee-1eaa-70ab-96ef-27a226ba82d3", map[string]string{"urn:uuid:801922ee-1eaa-70ab-96ef-27a226ba82d3": "Patient/801922ee-1eaa-70ab-96ef-27a226ba82d3"}, + nil, "Patient/801922ee-1eaa-70ab-96ef-27a226ba82d3", }, { "Patient/4a085566-49d8-fa6f-d934-8494253b3148", map[string]string{}, + nil, "Patient/4a085566-49d8-fa6f-d934-8494253b3148", }, { "Patient/4a085566-49d8-fa6f-d934-8494253b3148/_history/1", map[string]string{}, + nil, "Patient/4a085566-49d8-fa6f-d934-8494253b3148", }, { "http://example.org/fhir/Observation/1x2/_history/2", map[string]string{}, + nil, "http://example.org/fhir/Observation/1x2/_history/2", }, { " https://fhir.nextgen.com/nge/prod/fhir-api-r4/fhir/r4/Schedule?patient=12345-12345-12345-12345-12345", map[string]string{}, + nil, " https://fhir.nextgen.com/nge/prod/fhir-api-r4/fhir/r4/Schedule?patient=12345-12345-12345-12345-12345", }, + { + "#line-observation-1", + map[string]string{}, + &models.RawResourceFhir{ + SourceResourceType: "ExplanationOfBenefit", + SourceResourceID: "dme--10000930037927", + }, + "#line-observation-1", + }, + { + "#line-observation-1", + map[string]string{ + "ExplanationOfBenefit/dme--10000930037927#line-observation-1": "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvZG1lLS0xMDAwMDkzMDAzNzkyNyNsaW5lLW9ic2VydmF0aW9uLTE=", + }, + &models.RawResourceFhir{ + SourceResourceType: "ExplanationOfBenefit", + SourceResourceID: "dme--10000930037927", + }, + "Observation/RXhwbGFuYXRpb25PZkJlbmVmaXQvZG1lLS0xMDAwMDkzMDAzNzkyNyNsaW5lLW9ic2VydmF0aW9uLTE=", + }, } for _, tt := range tests { t.Run(tt.inputReferenceId, func(t *testing.T) { //test - ans := normalizeReferenceId(tt.inputReferenceId, tt.internalReferenceMap) + ans := normalizeReferenceId(tt.inputReferenceId, tt.internalReferenceMap, tt.currentResource) //assert require.Equal(t, tt.expectedNormalizedReferenceId, ans) diff --git a/clients/internal/base/testdata/fixtures/401-R4/document_reference/medicare-eob.json b/clients/internal/base/testdata/fixtures/401-R4/document_reference/medicare-eob.json new file mode 100644 index 000000000..385581b80 --- /dev/null +++ b/clients/internal/base/testdata/fixtures/401-R4/document_reference/medicare-eob.json @@ -0,0 +1,6882 @@ +{ + "resourceType": "ExplanationOfBenefit", + "id": "carrier--10000930037921", + "meta": { + "lastUpdated": "2023-06-14T12:31:42.354-04:00", + "profile": [ + "http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Professional-NonClinician" + ] + }, + "contained": [ + { + "resourceType": "Observation", + "id": "line-observation-1", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-2", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-3", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-4", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-5", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-6", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-7", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-8", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-9", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-10", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-11", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-12", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-13", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-14", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-15", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-16", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-17", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-18", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-19", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + }, + { + "resourceType": "Observation", + "id": "line-observation-20", + "status": "unknown", + "code": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_type_cd", + "code": "R1", + "display": "Hemoglobin Test" + } + ] + }, + "valueQuantity": { + "value": 0 + } + } + ], + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/nch_near_line_rec_ident_cd", + "code": "O", + "display": "Part B physician/supplier claim record (processed by local carriers; can include DMEPOS services)" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_num", + "valueIdentifier": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_num", + "value": "00510" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "valueIdentifier": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_clm_cntl_num", + "value": "-700301161" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_clm_pmt_dnl_cd", + "code": "1", + "display": "Physician/supplier" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/asgmntcd", + "code": "A", + "display": "Assigned claim" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_clm_entry_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_clm_entry_cd", + "code": "1", + "display": "Original debit; void of original debit (If CLM_DISP_CD = 3, code 1 means voided original debit)" + } + } + ], + "identifier": [ + { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "uc", + "display": "Unique Claim ID" + } + ] + }, + "system": "https://bluebutton.cms.gov/resources/variables/clm_id", + "value": "-10000930037921" + }, + { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "uc", + "display": "Unique Claim ID" + } + ] + }, + "system": "https://bluebutton.cms.gov/resources/identifier/claim-group", + "value": "-1632178268" + } + ], + "status": "active", + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/nch_clm_type_cd", + "code": "71", + "display": "Local carrier non-durable medical equipment, prosthetics, orthotics, and supplies (DMEPOS) claim" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/eob-type", + "code": "CARRIER" + }, + { + "system": "http://terminology.hl7.org/CodeSystem/claim-type", + "code": "professional", + "display": "Professional" + } + ] + }, + "use": "claim", + "patient": { + "reference": "Patient/-10000010254618" + }, + "billablePeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "created": "2023-10-05T20:48:36-04:00", + "insurer": { + "identifier": { + "value": "CMS" + } + }, + "provider": { + "identifier": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_clm_blg_npi_num", + "value": "1063654341" + } + }, + "referral": { + "identifier": { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "npi", + "display": "National Provider Identifier" + } + ] + }, + "value": "9999971093" + } + }, + "outcome": "complete", + "disposition": "1", + "careTeam": [ + { + "sequence": 1, + "provider": { + "identifier": { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "npi", + "display": "National Provider Identifier" + } + ] + }, + "value": "9999971093" + } + }, + "role": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "referring", + "display": "Referring" + } + ] + } + }, + { + "sequence": 2, + "provider": { + "identifier": { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "npi", + "display": "National Provider Identifier" + } + ] + } + } + }, + "role": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "referring", + "display": "Referring" + } + ] + } + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prvdr_type_cd", + "code": "0" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prtcptng_ind_cd", + "code": "7", + "display": "Participating provider not accepting assignment" + } + } + ], + "sequence": 3, + "provider": { + "identifier": { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "npi", + "display": "National Provider Identifier" + } + ] + }, + "value": "9999971093" + } + }, + "responsible": true, + "role": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimCareTeamRole", + "code": "performing", + "display": "Performing provider" + } + ] + }, + "qualification": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_spclty", + "code": "01", + "display": "General practice" + } + ] + } + }, + { + "sequence": 4, + "provider": { + "identifier": { + "type": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBIdentifierType", + "code": "npi", + "display": "National Provider Identifier" + } + ] + }, + "value": "1063654341" + }, + "display": "HEALTH SERVICES INC" + }, + "role": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claimcareteamrole", + "code": "primary", + "display": "Primary provider" + } + ] + } + } + ], + "supportingInfo": [ + { + "sequence": 1, + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBSupportingInfoType", + "code": "clmrecvddate", + "display": "Claim Received Date" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/nch_wkly_proc_dt", + "display": "NCH Weekly Claim Processing Date" + } + ] + }, + "timingDate": "2021-11-05" + }, + { + "sequence": 2, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-1" + } + }, + { + "sequence": 3, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-2" + } + }, + { + "sequence": 4, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-3" + } + }, + { + "sequence": 5, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-4" + } + }, + { + "sequence": 6, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-5" + } + }, + { + "sequence": 7, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-6" + } + }, + { + "sequence": 8, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-7" + } + }, + { + "sequence": 9, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-8" + } + }, + { + "sequence": 10, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-9" + } + }, + { + "sequence": 11, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-10" + } + }, + { + "sequence": 12, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-11" + } + }, + { + "sequence": 13, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-12" + } + }, + { + "sequence": 14, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-13" + } + }, + { + "sequence": 15, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-14" + } + }, + { + "sequence": 16, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-15" + } + }, + { + "sequence": 17, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-16" + } + }, + { + "sequence": 18, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-17" + } + }, + { + "sequence": 19, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-18" + } + }, + { + "sequence": 20, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-19" + } + }, + { + "sequence": 21, + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/claiminformationcategory", + "code": "info", + "display": "Information" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/information", + "code": "https://bluebutton.cms.gov/resources/variables/line_hct_hgb_rslt_num", + "display": "Hematocrit / Hemoglobin Test Results" + } + ] + }, + "valueReference": { + "reference": "#line-observation-20" + } + } + ], + "diagnosis": [ + { + "sequence": 1, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "T7432X" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "T7432X" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal", + "display": "principal" + } + ] + } + ] + }, + { + "sequence": 2, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "R4689", + "display": "OTHER SYMPTOMS AND SIGNS INVOLVING APPEARANCE AND BEHAVIOR" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "R4689", + "display": "OTHER SYMPTOMS AND SIGNS INVOLVING APPEARANCE AND BEHAVIOR" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/ex-diagnosistype", + "code": "principal", + "display": "principal" + } + ] + } + ] + }, + { + "sequence": 3, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "Z733", + "display": "\"STRESS, NOT ELSEWHERE CLASSIFIED\"" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "Z733", + "display": "\"STRESS, NOT ELSEWHERE CLASSIFIED\"" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 4, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "P292", + "display": "NEONATAL HYPERTENSION" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "P292", + "display": "NEONATAL HYPERTENSION" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 5, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E8881", + "display": "METABOLIC SYNDROME" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E8881", + "display": "METABOLIC SYNDROME" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 6, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "Z591", + "display": "INADEQUATE HOUSING" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "Z591", + "display": "INADEQUATE HOUSING" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 7, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "M5450" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "M5450" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 8, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E781", + "display": "PURE HYPERGLYCERIDEMIA" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E781", + "display": "PURE HYPERGLYCERIDEMIA" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 9, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "J329", + "display": "\"CHRONIC SINUSITIS, UNSPECIFIED\"" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "J329", + "display": "\"CHRONIC SINUSITIS, UNSPECIFIED\"" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 10, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E119", + "display": "TYPE 2 DIABETES MELLITUS WITHOUT COMPLICATIONS" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E119", + "display": "TYPE 2 DIABETES MELLITUS WITHOUT COMPLICATIONS" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 11, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "D649", + "display": "\"ANEMIA, UNSPECIFIED\"" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "D649", + "display": "\"ANEMIA, UNSPECIFIED\"" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 12, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "E089", + "display": "DIABETES DUE TO UNDERLYING CONDITION W/O COMPLICATIONS" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "E089", + "display": "DIABETES DUE TO UNDERLYING CONDITION W/O COMPLICATIONS" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + }, + { + "sequence": 13, + "diagnosisCodeableConcept": { + "coding": [ + { + "system": "http://hl7.org/fhir/sid/icd-10-cm", + "code": "B965", + "display": "PSEUDOMONAS (MALLEI) CAUSING DISEASES CLASSD ELSWHR" + }, + { + "system": "http://hl7.org/fhir/sid/icd-10", + "code": "B965", + "display": "PSEUDOMONAS (MALLEI) CAUSING DISEASES CLASSD ELSWHR" + } + ] + }, + "type": [ + { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBClaimDiagnosisType", + "code": "secondary", + "display": "Secondary" + } + ] + } + ] + } + ], + "insurance": [ + { + "focal": true, + "coverage": { + "reference": "Coverage/part-b--10000010254618" + } + } + ], + "item": [ + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 1, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 2 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 91.04, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 91.04, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 91.04, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 113.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 113.8, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 2, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 3 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 136, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 136, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 3, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 4 + ], + "informationSequence": [ + 4 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 108.8, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 136, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 136, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 4, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 5 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "99495" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 482.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 482.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 482.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 603.52, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 603.52, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 5, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 6 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 6.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 6.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 6.82, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 8.53, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 8.53, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 6, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 7 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 7, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 8 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 106.99, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 106.99, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 8, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 9 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 85.59, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 106.99, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 106.99, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 9, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 10 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "96156" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 367.28, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 367.28, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 367.28, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 459.1, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 459.1, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 10, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 11 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 11, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 12 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 12, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 3 + ], + "informationSequence": [ + 13 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 13, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 14 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "99401" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 14, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 15 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/betos_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/betos_cd", + "code": "Y1", + "display": "Other - Medicare fee schedule" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 15, + "careTeamSequence": [ + 3, + 4 + ], + "diagnosisSequence": [ + 2 + ], + "informationSequence": [ + 16 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "G0444" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/betos_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/betos_cd", + "code": "Y1", + "display": "Other - Medicare fee schedule" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 16, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 17 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "G0444" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 17, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 18 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 18, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 19 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "99408" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 19, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 20 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "productOrService": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/hcpcs", + "code": "99408" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + }, + { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_mtus_cnt", + "valueQuantity": { + "value": 35 + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_cd" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/line_prcsg_ind_cd", + "code": "A", + "display": "Allowed" + } + } + ], + "sequence": 20, + "careTeamSequence": [ + 3, + 4 + ], + "informationSequence": [ + 21 + ], + "category": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_cms_type_srvc_cd", + "code": "1", + "display": "Medical care" + } + ] + }, + "servicedPeriod": { + "start": "2021-11-01", + "end": "2021-11-01" + }, + "locationCodeableConcept": { + "extension": [ + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_state_cd", + "code": "AL" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/prvdr_zip", + "code": "361162501" + } + }, + { + "url": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "valueCoding": { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_prcng_lclty_cd", + "code": "1", + "display": "ALABAMA" + } + } + ], + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/line_place_of_srvc_cd", + "code": "11", + "display": "Office. Location, other than a hospital, skilled nursing facility (SNF), military treatment facility, community health center, State or local public health clinic, or intermediate care facility (ICF), where the health professional routinely provides health examinations, diagnosis, and treatment of illness or injury on an ambulatory basis." + } + ] + }, + "quantity": { + "value": 19 + }, + "adjudication": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudicationDiscriminator", + "code": "denialreason", + "display": "Denial Reason" + } + ] + }, + "reason": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/variables/carr_line_rdcd_pmt_phys_astn_c", + "code": "0", + "display": "N/A" + } + ] + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "benefit", + "display": "Benefit Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_nch_pmt_amt", + "display": "Line NCH Medicare Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtopatient", + "display": "Paid to patient" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_pmt_amt", + "display": "Line Payment Amount to Beneficiary" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "paidtoprovider", + "display": "Paid to provider" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_prvdr_pmt_amt", + "display": "Line Provider Payment Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "deductible", + "display": "Deductible" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_ptb_ddctbl_amt", + "display": "Line Beneficiary Part B Deductible Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_bene_prmry_pyr_pd_amt", + "display": "Line Primary Payer (if not Medicare) Paid Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "coinsurance", + "display": "Co-insurance" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_coinsrnc_amt", + "display": "Line Beneficiary Coinsurance Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "submitted", + "display": "Submitted Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_sbmtd_chrg_amt", + "display": "Line Submitted Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + }, + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/adjudication", + "code": "eligible", + "display": "Eligible Amount" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/line_alowd_chrg_amt", + "display": "Line Allowed Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ] + } + ], + "total": [ + { + "category": { + "coding": [ + { + "system": "http://hl7.org/fhir/us/carin-bb/CodeSystem/C4BBAdjudication", + "code": "priorpayerpaid", + "display": "Prior payer paid" + }, + { + "system": "https://bluebutton.cms.gov/resources/codesystem/adjudication", + "code": "https://bluebutton.cms.gov/resources/variables/clm_tot_chrg_amt", + "display": "Claim Total Charge Amount" + } + ] + }, + "amount": { + "value": 0, + "currency": "USD" + } + } + ], + "payment": { + "amount": { + "value": 1336.74, + "currency": "USD" + } + }, + "benefitBalance": [ + { + "category": { + "coding": [ + { + "system": "http://terminology.hl7.org/CodeSystem/ex-benefitcategory", + "code": "1", + "display": "Medical Care" + } + ] + }, + "financial": [ + { + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code": "https://bluebutton.cms.gov/resources/variables/carr_clm_cash_ddctbl_apld_amt", + "display": "Carrier Claim Cash Deductible Applied Amount (sum of all line-level deductible amounts)" + } + ] + }, + "usedMoney": { + "value": 0, + "currency": "USD" + } + }, + { + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code": "https://bluebutton.cms.gov/resources/variables/nch_clm_prvdr_pmt_amt", + "display": "NCH Claim Provider Payment Amount" + } + ] + }, + "usedMoney": { + "value": 1336.74, + "currency": "USD" + } + }, + { + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code": "https://bluebutton.cms.gov/resources/variables/nch_clm_bene_pmt_amt", + "display": "NCH Claim Payment Amount to Beneficiary" + } + ] + }, + "usedMoney": { + "value": 0, + "currency": "USD" + } + }, + { + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code": "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_sbmtd_chrg_amt", + "display": "NCH Carrier Claim Submitted Charge Amount (sum of all line-level submitted charges)" + } + ] + }, + "usedMoney": { + "value": 1670.93, + "currency": "USD" + } + }, + { + "type": { + "coding": [ + { + "system": "https://bluebutton.cms.gov/resources/codesystem/benefit-balance", + "code": "https://bluebutton.cms.gov/resources/variables/nch_carr_clm_alowd_amt", + "display": "NCH Carrier Claim Allowed Charge Amount (sum of all line-level allowed charges)" + } + ] + }, + "usedMoney": { + "value": 1336.74, + "currency": "USD" + } + } + ] + } + ] +} diff --git a/clients/models/mock/mock_resource.go b/clients/models/mock/mock_resource.go index 9a3157f64..84a18392c 100644 --- a/clients/models/mock/mock_resource.go +++ b/clients/models/mock/mock_resource.go @@ -5,6 +5,7 @@ package mock_models import ( + json "encoding/json" reflect "reflect" gomock "github.com/golang/mock/gomock" @@ -33,6 +34,20 @@ func (m *MockResourceInterface) EXPECT() *MockResourceInterfaceMockRecorder { return m.recorder } +// ContainedResources mocks base method. +func (m *MockResourceInterface) ContainedResources() []json.RawMessage { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "ContainedResources") + ret0, _ := ret[0].([]json.RawMessage) + return ret0 +} + +// ContainedResources indicates an expected call of ContainedResources. +func (mr *MockResourceInterfaceMockRecorder) ContainedResources() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ContainedResources", reflect.TypeOf((*MockResourceInterface)(nil).ContainedResources)) +} + // ResourceRef mocks base method. func (m *MockResourceInterface) ResourceRef() (string, *string) { m.ctrl.T.Helper() diff --git a/clients/models/mock/mock_source_client.go b/clients/models/mock/mock_source_client.go index d9bec03a7..ec4571b6b 100644 --- a/clients/models/mock/mock_source_client.go +++ b/clients/models/mock/mock_source_client.go @@ -53,11 +53,12 @@ func (mr *MockSourceClientMockRecorder) ExtractPatientId(bundleFile interface{}) } // GetRequest mocks base method. -func (m *MockSourceClient) GetRequest(resourceSubpath string, decodeModelPtr interface{}) error { +func (m *MockSourceClient) GetRequest(resourceSubpath string, decodeModelPtr interface{}) (string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetRequest", resourceSubpath, decodeModelPtr) - ret0, _ := ret[0].(error) - return ret0 + ret0, _ := ret[0].(string) + ret1, _ := ret[1].(error) + return ret0, ret1 } // GetRequest indicates an expected call of GetRequest. diff --git a/clients/models/resource.go b/clients/models/resource.go index 2b97c5b1d..20c118a5d 100644 --- a/clients/models/resource.go +++ b/clients/models/resource.go @@ -8,6 +8,7 @@ import ( //go:generate mockgen -source=resource.go -destination=mock/mock_resource.go type ResourceInterface interface { ResourceRef() (string, *string) + ContainedResources() []json.RawMessage } type RawResourceFhir struct { diff --git a/go.mod b/go.mod index b7c7397bb..5ea6b5060 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/fastenhealth/fasten-sources go 1.18 require ( - github.com/fastenhealth/gofhir-models v0.0.5 + github.com/fastenhealth/gofhir-models v0.0.6 github.com/golang/mock v1.6.0 github.com/samber/lo v1.35.0 github.com/seborama/govcr v4.5.0+incompatible @@ -25,4 +25,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/fastenhealth/gofhir-models => ../gofhir-models +//replace github.com/fastenhealth/gofhir-models => ../gofhir-models diff --git a/go.sum b/go.sum index 5a321099c..cb361fb23 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/fastenhealth/gofhir-models v0.0.6 h1:yJYYaV1eJtHiGEfA1rXLsyOm/9hIi6s2cGoZzGfW1tM= +github.com/fastenhealth/gofhir-models v0.0.6/go.mod h1:xB8ikGxu3bUq2b1JYV+CZpHqBaLXpOizFR0eFBCunis= github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=