Skip to content

Commit e6fe9cb

Browse files
tmp updates
1 parent 2b57542 commit e6fe9cb

1 file changed

Lines changed: 61 additions & 78 deletions

File tree

src/_pages/api-documentation/attestation-attribution.md

Lines changed: 61 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ in-page-nav: true
1010

1111
## Data Sources
1212

13-
DPC provides you with a set of sample practitioners to complete attestation and attribution in the sandbox.
13+
<!-- RATIONALE: Make it explicit that users must upload sample JSON (sandbox does not preload data), to reduce confusion. -->
14+
DPC provides sample Practitioner, Patient, and Group JSON resources you can upload to complete attestation and attribution in the sandbox.
1415

1516
Attestation/Attribution is when DPC establishes that you have a valid patient-practitioner relationship with Medicare and Medicaid beneficiaries.
1617

@@ -25,17 +26,26 @@ You need to keep attributions up-to-date by submitting an attestation with each
2526

2627
## Load sample data
2728

28-
The DPC team has created a collection of sample Practitioner, Patient, and Group Resources to use with the sandbox. These resources can be found in our public GitHub repository as JSON files.
29+
<!-- RATIONALE: Link directly to the sample bundles available in this site so users can find them without hunting elsewhere. -->
30+
The DPC team provides sample Practitioner and Patient resources you can upload to the sandbox:
31+
32+
- <a href="{{ site.url }}/assets/downloads/practitioner_bundle.json">practitioner_bundle.json</a>
33+
- <a href="{{ site.url }}/assets/downloads/patient_bundle.json">patient_bundle.json</a>
2934

3035
### Uploading practitioners
3136

3237
We include four generic Practitioner Resources to add to your organization.
3338

34-
### Uploading Patients
39+
### Uploading patients
3540

3641
The Beneficiary FHIR Data Server (BFD) maintains a list of 101 patients, along with their Medicare Beneficiary Identifiers (MBI), that match synthetic sandbox data. More details and the corresponding data files can be found on the Blue Button 2.0 API's documentation under <a href="https://bluebutton.cms.gov/developers/#sample-beneficiaries" target="_blank" rel=noopener>Sample Beneficiaries</a>.
3742

38-
You also provide your own sample FHIR resources. These will need to fulfill the required FHIR profiles. All Patient Resources need an MBI that matches a record in BFD.
43+
You can also provide your own sample FHIR resources. These will need to fulfill the required FHIR profiles. All Patient Resources need an MBI that matches a record in BFD.
44+
45+
<!-- RATIONALE: The doc referenced “find organization id” but didn’t explain how; add a small, concrete section tied to the Organization examples. -->
46+
### Find organization ID {#find-organization-id-2}
47+
48+
Use the Organization endpoint to retrieve your Organization resource and its `Organization.id`.
3949

4050
#### Request
4151

@@ -44,12 +54,12 @@ GET /api/v1/Organization
4454
{% endraw %}{% endcapture %}
4555
{% include copy_snippet.html code=curlSnippet language="shell" %}
4656

47-
#### cURL command
57+
#### Headers
4858

59+
<!-- RATIONALE: Keep examples copy/pasteable by separating header listing from the cURL command; also avoid implying GET needs Content-Type/Prefer headers. -->
4960
{% capture curlSnippet %}{% raw %}
5061
Authorization: Bearer {access_token}
5162
Accept: application/fhir+json
52-
Prefer: respond-async
5363
{% endraw %}{% endcapture %}
5464
{% include copy_snippet.html code=curlSnippet language="shell" %}
5565

@@ -59,7 +69,6 @@ Prefer: respond-async
5969
curl -v https://sandbox.dpc.cms.gov/api/v1/Organization \
6070
-H 'Authorization: Bearer {access_token}' \
6171
-H 'Accept: application/fhir+json' \
62-
-H 'Content-Type: application/fhir+json' \
6372
-X GET
6473
{% endraw %}{% endcapture %}
6574
{% include copy_snippet.html code=curlSnippet language="shell" %}
@@ -117,12 +126,12 @@ GET /api/v1/Organization/{id}
117126
{% endraw %}{% endcapture %}
118127
{% include copy_snippet.html code=curlSnippet language="shell" %}
119128

120-
#### cURL command
129+
#### Headers
121130

131+
<!-- RATIONALE: Keep examples copy/pasteable by separating header listing from the cURL command; also avoid implying GET needs Content-Type/Prefer headers. -->
122132
{% capture curlSnippet %}{% raw %}
123133
Authorization: Bearer {access_token}
124134
Accept: application/fhir+json
125-
Prefer: respond-async
126135
{% endraw %}{% endcapture %}
127136
{% include copy_snippet.html code=curlSnippet language="shell" %}
128137

@@ -132,7 +141,6 @@ Prefer: respond-async
132141
curl -v https://sandbox.dpc.cms.gov/api/v1/Organization/{id} \
133142
-H 'Authorization: Bearer {access_token}' \
134143
-H 'Accept: application/fhir+json' \
135-
-H 'Content-Type: application/fhir+json' \
136144
-X GET
137145
{% endraw %}{% endcapture %}
138146
{% include copy_snippet.html code=curlSnippet language="shell" %}
@@ -176,7 +184,8 @@ curl -v https://sandbox.dpc.cms.gov/api/v1/Organization/{id} \
176184

177185
### Add a practitioner
178186

179-
To register a practitioner at your organization, you must send a FHIR-formatted <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-practitioner.html" target="_blank" rel=noopener>Practitioner</a> Resource in the body of your request. Don't use encoding (raw) when uploading via a POST request to the /Practitioner endpoint.
187+
<!-- RATIONALE: “encoding (raw)” is ambiguous; clarify as “send raw JSON body” so users know what to do in tools like Postman/cURL. -->
188+
To register a practitioner at your organization, you must send a FHIR-formatted <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-practitioner.html" target="_blank" rel=noopener>Practitioner</a> Resource in the body of your request. Send the raw JSON body (do not form-encode it) when uploading via a POST request to the /Practitioner endpoint.
180189

181190
The Practitioner Resource may include additional attributes detailed in the FHIR Implementation Guide within <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-practitioner.html" target="_blank" rel=noopener>DPC Practitioner Profile</a>.
182191

@@ -185,7 +194,8 @@ The Practitioner Resource may include additional attributes detailed in the FHIR
185194
- First and last name
186195
- Type 1 National Provider Identifier (NPI)
187196

188-
Note: If an existing practitioner is found with the same NPI, the `/practitioner` endpoint will return that same practitioner.
197+
<!-- RATIONALE: Normalize endpoint casing to match the rest of the examples and avoid 404s in case of case-sensitive tooling/docs. -->
198+
Note: If an existing practitioner is found with the same NPI, the `/Practitioner` endpoint will return that same practitioner.
189199

190200
#### Request
191201

@@ -213,7 +223,8 @@ The Practitioner endpoint supports a $submit operation. This operation lets you
213223
Each individual Practitioner Resource in your bundle must satisfy the requirements on how to add a [Practitioner Resource](#add-a-practitioner). Otherwise a 422-Unprocessable Entity error will be returned.
214224

215225

216-
<a href="{{ site.url }}/assets/downloads/practitioner_bundle.json">Sample practitoner_bundle.json</a>
226+
<!-- RATIONALE: Fix typo in link text (“practitoner”) so readers can search/copy the filename accurately. -->
227+
<a href="{{ site.url }}/assets/downloads/practitioner_bundle.json">Sample practitioner_bundle.json</a>
217228

218229

219230
#### Request
@@ -269,11 +280,11 @@ GET /api/v1/Practitioner?identifier={practitioner_npi}
269280

270281
#### cURL command:
271282

283+
<!-- RATIONALE: The prior cURL example omitted the query parameter; keep request + cURL consistent so copy/paste works. -->
272284
{% capture curlSnippet %}{% raw %}
273-
curl -v https://sandbox.dpc.cms.gov/api/v1/Practitioner \
285+
curl -v 'https://sandbox.dpc.cms.gov/api/v1/Practitioner?identifier={practitioner_npi}' \
274286
-H 'Authorization: Bearer {access_token}' \
275287
-H 'Accept: application/fhir+json' \
276-
-H 'Content-Type: application/fhir+json' \
277288
-X GET
278289
{% endraw %}{% endcapture %}
279290
{% include copy_snippet.html code=curlSnippet language="shell" %}
@@ -317,52 +328,8 @@ curl -v https://sandbox.dpc.cms.gov/api/v1/Practitioner \
317328
{% endraw %}{% endcapture %}
318329
{% include copy_snippet.html code=jsonSnippet language="json" %}
319330

320-
## Make Practitioner/Provenance
321-
322-
CMS requires practitioners to attest that they have a treatment-related purpose for adding a patient to their group each time they make a group addition. This is accomplished by submitting an attestation with every request. Attestations are posted as a <a href="https://www.hl7.org/fhir/provenance.html" target="_blank" rel=noopener>Provenance</a> Resource via the X-Provenance header, as outlined in the <a href="https://www.hl7.org/fhir/implementationguide.html" target="_blank" rel=noopener>FHIR specification</a>.
323-
324-
The attestation is then included in the X-Provenance header as part of any operations which add patients to the Group Resource.
325-
326-
#### Example attestation for X-Provenance header
327-
328-
{% capture jsonSnippet %}{% raw %}
329-
{
330-
"resourceType": "Provenance",
331-
"meta": {
332-
"profile": [
333-
"https://dpc.cms.gov/api/v1/StructureDefinition/dpc-profile-attestation"
334-
]
335-
},
336-
"recorded": "1990-01-01T00:00:00.000-05:00",
337-
"reason": [
338-
{
339-
"system": "http://hl7.org/fhir/v3/ActReason",
340-
"code": "TREAT"
341-
}
342-
],
343-
"agent": [
344-
{
345-
"role": [
346-
{
347-
"coding": [
348-
{
349-
"system": "http://hl7.org/fhir/v3/RoleClass",
350-
"code": "AGNT"
351-
}
352-
]
353-
}
354-
],
355-
"whoReference": {
356-
"reference": "Organization/{organization_id}"
357-
},
358-
"onBehalfOfReference": {
359-
"reference": "Practitioner/{practitioner_id}"
360-
}
361-
}
362-
]
363-
}
364-
{% endraw %}{% endcapture %}
365-
{% include copy_snippet.html code=jsonSnippet language="json" %}
331+
<!-- RATIONALE: Remove duplicated/renamed “Make Practitioner/Provenance” section and point readers to the canonical Attestation section to avoid drift. -->
332+
Attestation is required when adding patients to a Group. See the [Attestation](#attestation) section below for requirements and an example `X-Provenance` header.
366333

367334
## Patients
368335

@@ -372,9 +339,10 @@ Since there is not any preloaded data in DPC's sandbox, the Beneficiary FHIR Dat
372339

373340
### Add a patient
374341

375-
To register a patient at your organization, you must create a <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-patient.html" target="_blank" rel=noopener>Patient</a> Resource as a JSON file in FHIR format. The JSON file must be in the body of your request with no encoding (raw) when uploading via a POST request to the /Patient endpoint.
342+
<!-- RATIONALE: Clarify “raw/encoding” wording and fix mislabeled profile link text (Patient section should refer to Patient profile). -->
343+
To register a patient at your organization, you must create a <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-patient.html" target="_blank" rel=noopener>Patient</a> Resource as a JSON file in FHIR format. Send the raw JSON body (do not form-encode it) when uploading via a POST request to the /Patient endpoint.
376344

377-
To create the Patient Resource, the JSON file may include additional attributes detailed in the FHIR Implementation Guide within the <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-patient.html" target="_blank" rel=noopener>DPC Practitioner Profile</a>.
345+
To create the Patient Resource, the JSON file may include additional attributes detailed in the FHIR Implementation Guide within the <a href="https://dpc.cms.gov/ig/StructureDefinition-dpc-profile-patient.html" target="_blank" rel=noopener>DPC Patient Profile</a>.
378346

379347
#### Minimum requirements
380348

@@ -385,7 +353,8 @@ To create the Patient Resource, the JSON file may include additional attributes
385353

386354
When sharing data, DPC uses the Patient.gender property to represent the sex of the patient as maintained on record at CMS. When registering a patient to your organization, DPC will require you to submit the Patient.gender property following the corresponding value set. The input provided may be used by DPC to match and validate the patient against CMS records.
387355

388-
Note: If an existing patient is found with the same MBI, the /patient endpoint will return that same patient.
356+
<!-- RATIONALE: Normalize endpoint casing for consistency with the rest of the page and examples. -->
357+
Note: If an existing patient is found with the same MBI, the /Patient endpoint will return that same patient.
389358

390359
#### Example
391360

@@ -535,7 +504,7 @@ curl -v https://sandbox.dpc.cms.gov/api/v1/Patient \
535504

536505
### List a specific patient
537506

538-
The Patient endpoint also supports a GET /Patient operation. This operations lets you supply the Patient MBI and receive the Patient Resource. You may use this to identify a Patient's DPC ID based off on an MBI.
507+
The Patient endpoint also supports a GET /Patient operation. This operation lets you supply the Patient MBI and receive the Patient Resource. You may use this to identify a Patient's DPC ID based on an MBI.
539508

540509
#### Request
541510

@@ -546,11 +515,11 @@ GET /api/v1/Patient?identifier={patient_mbi}
546515

547516
#### cURL command
548517

518+
<!-- RATIONALE: The prior cURL example omitted the query parameter; keep request + cURL consistent so copy/paste works. -->
549519
{% capture curlSnippet %}{% raw %}
550-
curl -v https://sandbox.dpc.cms.gov/api/v1/Patient \
520+
curl -v 'https://sandbox.dpc.cms.gov/api/v1/Patient?identifier={patient_mbi}' \
551521
-H 'Authorization: Bearer {access_token}' \
552522
-H 'Accept: application/fhir+json' \
553-
-H 'Content-Type: application/fhir+json' \
554523
-X GET
555524
{% endraw %}{% endcapture %}
556525
{% include copy_snippet.html code=curlSnippet language="shell" %}
@@ -610,7 +579,7 @@ Details on Provenance Resources are given in the <a href="https://www.hl7.org/fh
610579
Timestamp. Time when attestation was made
611580
Reason. Reason for the attestation (currently only: <a href="http://hl7.org/fhir/v3/ActReason#TREAT">http://hl7.org/fhir/v3/ActReason#TREAT</a> is supported)
612581
Organization ID. The agent making the attestation referenced by their Organization Resource ID
613-
_Your Organization ID can be found in the DPC Portal by following <a href="#find-organization-id"> these instructions</a>._
582+
_Your Organization ID can be found in the DPC Portal by following <a href="#find-organization-id-2"> these instructions</a>._
614583
Practitioner ID. The practitioner attached to the attestation referenced by their Practitioner ID. _Your Practitioner ID can be found by referencing the `{id}` variable in the resource object of your practitioner._
615584

616585
The attestation is then included in the X-Provenance header as part of any operations which add patients to the Group Resource.
@@ -656,27 +625,32 @@ The attestation is then included in the X-Provenance header as part of any opera
656625
{% endraw %}{% endcapture %}
657626
{% include copy_snippet.html code=jsonSnippet language="json" %}
658627

628+
<!-- RATIONALE: Users often paste multi-line JSON into headers and get hard-to-debug errors; call out the “single-line JSON string” requirement. -->
629+
To send this Provenance in the `X-Provenance` header, serialize it as JSON on a single line (no newlines). Your tooling may require escaping quotes when setting header values.
630+
659631
### Update a group
660632

661633
Patient/practitioner relationships automatically expire after 90 days and must be re-attested by the practitioner. This is accomplished by re-attributing the patient to the practitioner's group.
662634

663635
### Identifying expired patients
664636

665-
Patient attributions expire and must be renewed after 90 days. You can identify these patients through a GET request to the /Group endpoint. This will return a JSON file with all the patients attributed to the group. Evaluate this JSON for patients with attribution dates greater than 90 days.
637+
<!-- RATIONALE: Previous guidance referenced “attribution dates” without showing where to find them; point to Group.member.period.end and ensure the example includes it. -->
638+
Patient attributions expire and must be renewed after 90 days. You can identify these patients by retrieving the Group and checking each member's `period.end`.
666639

667640
#### Request
668641

669642
{% capture curlSnippet %}{% raw %}
670-
GET api/v1/Group?characteristic-value=attributed-to${group_id}
643+
GET /api/v1/Group/{group_id}
671644
{% endraw %}{% endcapture %}
672645
{% include copy_snippet.html code=curlSnippet language="shell" %}
673646

674647
#### cURL command:
675648

676649
{% capture curlSnippet %}{% raw %}
677-
curl -v https://sandbox.dpc.cms.gov/api/v1/Group?characteristic-value=attributed-to${group_id}
650+
curl -v https://sandbox.dpc.cms.gov/api/v1/Group/{group_id} \
678651
-H 'Authorization: Bearer {access_token}' \
679-
-H 'Accept: application/fhir+json'
652+
-H 'Accept: application/fhir+json' \
653+
-X GET
680654
{% endraw %}{% endcapture %}
681655
{% include copy_snippet.html code=curlSnippet language="shell" %}
682656

@@ -710,6 +684,10 @@ curl -v https://sandbox.dpc.cms.gov/api/v1/Group?characteristic-value=attributed
710684
{
711685
"entity": {
712686
"reference": "Patient/bb151edf-a8b5-4f5c-9867-69794bcb48d1"
687+
},
688+
"period": {
689+
"start": "2020-06-17T17:44:27+00:00",
690+
"end": "2020-09-15T17:44:27+00:00"
713691
}
714692
}
715693
]
@@ -721,11 +699,12 @@ curl -v https://sandbox.dpc.cms.gov/api/v1/Group?characteristic-value=attributed
721699

722700
#### cURL command
723701

702+
<!-- RATIONALE: Fix malformed header example (stray HTML) and make the placeholder indicate a header-safe JSON string. -->
724703
{% capture curlSnippet %}{% raw %}
725-
curl -v https://sandbox.dpc.cms.gov/api/v1/Group/{group_id}/\$add
704+
curl -v https://sandbox.dpc.cms.gov/api/v1/Group/{group_id}/\$add \
726705
-H 'Authorization: Bearer {access_token}' \
727706
-H 'Accept: application/fhir+json' \
728-
-H 'X-Provenance: {FHIR provenance resource}</span> \
707+
-H 'X-Provenance: {FHIR Provenance resource (JSON string)}' \
729708
-X POST \
730709
-d @group_addition.json
731710
{% endraw %}{% endcapture %}
@@ -837,11 +816,12 @@ PUT /api/v1/Group/{group_id}
837816

838817
#### cURL command
839818

819+
<!-- RATIONALE: Same as $add: keep cURL syntactically valid and clarify `X-Provenance` expects a JSON string value. -->
840820
{% capture curlSnippet %}{% raw %}
841821
curl -v https://sandbox.dpc.cms.gov/api/v1/Group/{group_id} \
842822
-H 'Authorization: Bearer {access_token}' \
843823
-H 'Accept: application/fhir+json' \
844-
-H 'X-Provenance: {FHIR provenance resource}</span> \
824+
-H 'X-Provenance: {FHIR Provenance resource (JSON string)}' \
845825
-X PUT \
846826
-d @updated_group.json
847827
{% endraw %}{% endcapture %}
@@ -906,6 +886,9 @@ The response will return a <a href="https://www.hl7.org/fhir/STU3/bundle.html" t
906886

907887
You can use the `Group.id` value of the returned resources to initiate an export job. Find your Group ID by referencing the `{id}` variable in your group's resource object.
908888

889+
<!-- RATIONALE: `${var}` looked like shell interpolation; use `%24` to represent the composite delimiter unambiguously and explain what it means. -->
890+
In the request below, `%24` is the URL-encoded form of `$`, which separates values for FHIR composite search parameters.
891+
909892
#### Example
910893

911894
{% capture jsonSnippet %}{% raw %}
@@ -921,17 +904,17 @@ You can use the `Group.id` value of the returned resources to initiate an export
921904
#### Request
922905

923906
{% capture curlSnippet %}{% raw %}
924-
GET /api/v1/Group?characteristic-value=attributed-to${practitioner_npi}
907+
GET /api/v1/Group?characteristic-value=attributed-to%24{practitioner_npi}
925908
{% endraw %}{% endcapture %}
926909
{% include copy_snippet.html code=curlSnippet language="shell" %}
927910

928911
#### cURL command
929912

930913
{% capture curlSnippet %}{% raw %}
931-
curl -v https://sandbox.dpc.cms.gov/api/v1/Group/{group_id} \
914+
curl -v 'https://sandbox.dpc.cms.gov/api/v1/Group?characteristic-value=attributed-to%24{practitioner_npi}' \
932915
-H 'Authorization: Bearer {access_token}' \
933916
-H 'Accept: application/fhir+json' \
934-
-H 'X-Provenance: {FHIR provenance resource}
917+
-X GET
935918
{% endraw %}{% endcapture %}
936919
{% include copy_snippet.html code=curlSnippet language="shell" %}
937920

0 commit comments

Comments
 (0)