Da Vinci Clinical Data Exchange (CDex)
2.1.0 - STU 2.1

Publication Build: This will be filled in by the publication tooling

## Sending Attachments

Page standards status: Trial-use

This page documents a FHIR-based approach to sending attachments for claims or prior authorization directly to a Payer.* This transaction is used for both solicited and unsolicited attachments. It is intended to be compatible with the X12n 275 transaction, the X12 N 837I and 837P for claims purposes, and the 278 response for authorizations (for more information on X12 defined transactions, see X12 Transaction Sets). Compatibility assumes that the appropriate identifiers are supported in the submission to facilitate the association of the attachment with the claim submission or authorization request.

See the Conforming to CDex Attachments page for how systems declare what they support for the various actors and roles in CDex Attachments.

### `$submit-attachment` Operation

This guide defines `$submit-attachment`, a simple RESTful interaction for exchanging attachments using a FHIR Operation. Providers use this operation to submit solicited and unsolicited attachments or additional information for claims or prior authorization. The $submit-attachment operation accepts the clinical/administrative attachments and the information required to associate them with the claim or prior authorization and returns an HTTP response. For unsolicited attachments, the Provider invokes this operation before, concurrently, or after the claim or pre-authorization transaction. For solicited attachments, the Provider invokes it when responding to a Payer request for attachments or additional information. Any HTTP endpoint can use $submit-attachment, not just FHIR RESTful server endpoints. Implementers of CDex's Unsolicited Attachments SHOULD support the Endpoint Discovery Strategy defined in the Da Vinci HRex specification to allow discovery of the endpoint for this operation. For Solicited Attachments, the $submit-attachment endpoint is supplied in the CDex Task Attachment Request Profile

The input parameters are:

1. One or more attachments as FHIR Resources
   - Optionally, one or more unique line item numbers associated with the attachment
   - Optionally, the attachment code used to request the information
2. Data elements for the association to the claim/prior authorization
   - A unique identifier that ties the attachment(s) back to the claim or prior authorization. (referred to as the "re-association tracking control numbers")
   - What are the attachments for:
     - Claims
     - Prior Authorizations
   - Optionally, a unique payer identifier
   - A unique organization/location identifier (e.g., Type 2 NPI) or unique provider identifier (e.g., Type 1 NPI)
   - A unique Patient member identifier
   - A Date of Service
   - A Flag indicating whether the operation is the last attachment submission for the claim or prior authorization.

There are no output parameters.

See the `$submit-attachment` operation definition for further details.

Based upon additional testing, we intend to to upgrade the Endpoint Discovery Strategy guidance (SHOULD) to a requirement (SHALL) in the next version of CDex

### Technical Workflow

As shown below in Figure 13, the attachments are "pushed" using the `$submit-attachment` operation directly to the Payer or an Intermediary.

Figure 13

1. The Provider assembles the attachments and metadata to associate the attachments to a claim or prior authorization
2. The Provider invokes `$submit-attachment` operation to submit attachments to the Payer
3. The Payer responds with an HTTP response that accepts or rejects the transaction.
   - The Payer SHOULD return an informational OperationOutcome with the HTTP accept response if the attachments can not be associated with a current claim or prior authorization and are being held for association with a future claim or prior authorization. An OperationOutcome example is used in Scenario 1b below.
4. The Payer associates the attachments to the claim or prior authorization and processes the claim.

### Data Elements for Sending Attachments

When sending attachments, the following data elements are needed to associate an attachment to a claim or prior authorization. They are mapped to the `$submit-attachment` parameters and their corresponding x12n 275 elements in the following table. Express permission to use X12 copyrighted materials within this document has been granted.

Data Element | CDex $submit-attachment Parameter | X12n 275-v6020 | Submit Attachments Comments
--- | --- | --- | ---
Tracking ID | TrackingId | Loop: 2000A Segment: TRN02 | For unsolicited attachments, this is the provider-assigned tracking/control number. For solicited attachments, this is the payer-assigned tracking/control number.
Use | AttachTo | Claim | Choice of "claim" or "preauthorization"
Payer ID | PayerId | Loop: 1000A Segment: NM109 | Payer ID
Payer URL | (operation endpoint) | - | Payer endpoint where the attachments are submitted using the $submit-attachment operation
Organization ID | OrganizationId | Loop: 1000B Segment: NM109 Notes: NM108="46" | Organization of provider who submitted claim/prior authorization
Provider ID | ProviderId | Loop: 1000C Segment: NM109 Notes: NM108="XX" | Provider who submitted claim/prior authorization
Line Item(s) | Attachment.LineItem | Loop: 2000A Segment: STC10 Notes: Used to convey status of the entire claim or a specific service line | Claim/prior authorization line item numbers
Attachment Code | Attachment.Code | Loop: 2000A Segment: STC01-01 | LOINC Attachment Code. For prior authorization, X12 PWK01 Report Type Codes may also be used.
Date of Service | ServiceDate | Loop: 2100A Segment: DTP03 | Date of service for claim/prior authorization
Member ID | MemberId | Loop: 1000D Segment: NM109 Notes: NM108="MI" | Payer assigned patient identifier

The data element mapping table is available as a CSV and Excel file.

For solicited attachments, the Payer sends the same data elements in the request for attachments. See the Requesting Attachments Using Attachment Codes and Requesting Attachments Using Questionnaires pages for a detailed discussion on how these data elements are used in the CDex Attachment Request Profile to request attachments and in the `$submit-attachment` response to the Payer.

### Examples

In the following examples, a Provider creates a claim and sends unsolicited attachments using the FHIR operation, `$submit-attachment`. For solicited attachments examples, see the Requesting Attachments Using Attachment Codes and Requesting Attachments Using Questionnaires pages.

`POST [base]/$submit-attachment`

##### Scenario 1a: CCDA Document Attachments

- Based on the Payer's pre-defined rules, the Provider submits C-CDA Documents as additional documentation for a claim.
  - Typically, when the attachments are C-CDA documents, as in this scenario, they are already digitally signed and supply provenance information. Therefore, FHIR signatures and external Provenance resources are not needed.
- The Provider knows the Payer's endpoint for sending attachments. Note that the Provider can POST the `$submit-attachment` operation to endpoints that are not FHIR RESTful servers.
- An unsolicited workflow implies that the Provider assigns the claim and line item identifiers upon claim generation.
- The Payer associates attachments to the claim.

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "11234657"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "234567"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "LineItem",
          "valueString" : "2"
        },
        {
          "name" : "LineItem",
          "valueString" : "3"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11504-8",
              "display" : "Surgical operation note"
            }],
            "text" : "Surgical operation note"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "DocumentReference",
            "status" : "current",
            "type" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "11504-8",
                "display" : "Surgical operation note"
              }],
              "text" : "Surgical operation note"
            },
            "category" : [{
              "coding" : [{
                "system" : "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category",
                "code" : "clinical-note",
                "display" : "Clinical Note"
              }],
              "text" : "Clinical Note 1"
            }],
            "subject" : {
              "identifier" : {
                "system" : "http://example.org/cdex/member-ids",
                "value" : "234567"
              }
            },
            "date" : "2022-07-13T10:30:00-05:00",
            "content" : [{
              "attachment" : {
                "contentType" : "text/xml",
                "data" : " ",
                "hash" : "026d568297832e6e083e96549041a72aa383bb23",
                "title" : "Example CCDA"
              }
            }]
          }
        }]
      }]
    }

Response Headers

    HTTP/1.1 200 OK
    Server: nginx/1.14.0 (Ubuntu)
    Date: Fri, 23 Oct 2020 04:54:56 GMT
    Content-Type: application/fhir+json;charset=utf-8
    ...(other headers)

##### Rendered Documents

This is the default view using a HTML5 browser. The content may not render correctly in HTML 4.0 and older browsers. Typically a CCDA stylesheet is used to make this data easier to read and arrange according to provider preferences

#### Scenario 1b: CCDA Document Attachments Submitted Prior to claim

This scenario is the same as Scenario 1a above, except the attachments are submitted prior to the claim. The Payer accepts the attachments and returns an OperationOutcome informing the Provider system that the attachments are waiting for the claim.

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "11234657"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "234567"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "LineItem",
          "valueString" : "2"
        },
        {
          "name" : "LineItem",
          "valueString" : "3"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11504-8",
              "display" : "Surgical operation note"
            }],
            "text" : "Surgical operation note"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "DocumentReference",
            "status" : "current",
            "type" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "11504-8",
                "display" : "Surgical operation note"
              }],
              "text" : "Surgical operation note"
            },
            "category" : [{
              "coding" : [{
                "system" : "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category",
                "code" : "clinical-note",
                "display" : "Clinical Note"
              }],
              "text" : "Clinical Note 1"
            }],
            "subject" : {
              "identifier" : {
                "system" : "http://example.org/cdex/member-ids",
                "value" : "234567"
              }
            },
            "date" : "2022-07-13T10:30:00-05:00",
            "content" : [{
              "attachment" : {
                "contentType" : "text/xml",
                "data" : " ",
                "hash" : "026d568297832e6e083e96549041a72aa383bb23",
                "title" : "Example CCDA"
              }
            }]
          }
        }]
      }]
    }

Response Headers

    HTTP/1.1 200 OK
    Server: nginx/1.14.0 (Ubuntu)
    Date: Fri, 23 Oct 2020 04:54:56 GMT
    Content-Type: application/fhir+json;charset=utf-8
    ...(other headers)

Response Body

    {
      "resourceType" : "OperationOutcome",
      "text" : {
        "status" : "generated",
        "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\">\n      <p>The attachments can not be associated with a current claim or prior authorization and are being held for association with a future claim or prior authorization.</p>\n    </div>"
      },
      "issue" : [{
        "severity" : "information",
        "code" : "informational",
        "details" : {
          "text" : "The attachments can not be associated with a current claim or prior authorization and are being held for association with a future claim or prior authorization."
        }
      }]
    }

##### Rendered Documents

This is the default view using a HTML5 browser. The content may not render correctly in HTML 4.0 and older browsers. Typically a CCDA stylesheet is used to make this data easier to read and arrange according to provider preferences

##### Scenario 2: Laboratory Results Attachments

This scenario is the same as Scenario 1a, except the Provider submits laboratory results supporting a claim. There are multiple attachments, each populated with a FHIR Observation resource. If a signature were required, the provider system would convert it to a signed FHIR document, as shown in the example in the signatures section.

      # unsolicited-attachment-scenario2

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "trackingid456"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "Payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "Member123"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11502-2",
              "display" : "Laboratory report"
            }],
            "text" : "Laboratory report"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "Observation",
            "id" : "cdex-2020-04-23-hba1c-example",
            "status" : "final",
            "category" : [{
              "coding" : [{
                "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
                "code" : "laboratory",
                "display" : "Laboratory"
              }],
              "text" : "Laboratory"
            }],
            "code" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "4548-4",
                "display" : "Hemoglobin A1c/Hemoglobin.total in Blood"
              },
              {
                "system" : "http://www.ama-assn.org/go/cpt",
                "code" : "83036",
                "display" : "Hemoglobin; glycosylated (A1c)"
              },
              {
                "system" : "http://example.org/lab-results",
                "code" : "HBA1C",
                "display" : "Glycated hemoglobin (HbA1c)"
              }],
              "text" : "glycated hemoglobin (HbA1c)"
            },
            "subject" : {
              "display" : "Elden718 Halvorson124"
            },
            "effectiveDateTime" : "2022-06-16T10:21:08-07:00",
            "performer" : [{
              "display" : "Dr. John Doe"
            }],
            "valueQuantity" : {
              "value" : 7.2,
              "unit" : "%",
              "system" : "http://unitsofmeasure.org",
              "code" : "%"
            }
          }
        }]
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11502-2",
              "display" : "Laboratory report"
            }],
            "text" : "Laboratory report"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "Observation",
            "id" : "cdex-2020-10-23-hba1c-example",
            "status" : "final",
            "category" : [{
              "coding" : [{
                "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
                "code" : "laboratory",
                "display" : "Laboratory"
              }],
              "text" : "Laboratory"
            }],
            "code" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "4548-4",
                "display" : "Hemoglobin A1c/Hemoglobin.total in Blood"
              },
              {
                "system" : "http://www.ama-assn.org/go/cpt",
                "code" : "83036",
                "display" : "Hemoglobin; glycosylated (A1c)"
              },
              {
                "system" : "http://example.org/lab-results",
                "code" : "HBA1C",
                "display" : "Glycated hemoglobin (HbA1c)"
              }],
              "text" : "glycated hemoglobin (HbA1c)"
            },
            "subject" : {
              "display" : "Elden718 Halvorson124"
            },
            "effectiveDateTime" : "2022-05-16T10:21:08-07:00",
            "performer" : [{
              "display" : "Dr. John Doe"
            }],
            "valueQuantity" : {
              "value" : 7,
              "unit" : "%",
              "system" : "http://unitsofmeasure.org",
              "code" : "%"
            }
          }
        }]
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11502-2",
              "display" : "Laboratory report"
            }],
            "text" : "Laboratory report"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "Observation",
            "id" : "cdex-2020-07-23-hba1c-example",
            "status" : "final",
            "category" : [{
              "coding" : [{
                "system" : "http://terminology.hl7.org/CodeSystem/observation-category",
                "code" : "laboratory",
                "display" : "Laboratory"
              }],
              "text" : "Laboratory"
            }],
            "code" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "4548-4",
                "display" : "Hemoglobin A1c/Hemoglobin.total in Blood"
              },
              {
                "system" : "http://www.ama-assn.org/go/cpt",
                "code" : "83036",
                "display" : "Hemoglobin; glycosylated (A1c)"
              },
              {
                "system" : "http://example.org/lab-results",
                "code" : "HBA1C",
                "display" : "Glycated hemoglobin (HbA1c)"
              }],
              "text" : "glycated hemoglobin (HbA1c)"
            },
            "subject" : {
              "display" : "Elden718 Halvorson124"
            },
            "effectiveDateTime" : "2022-04-16T10:21:08-07:00",
            "performer" : [{
              "display" : "Dr. John Doe"
            }],
            "valueQuantity" : {
              "value" : 7,
              "unit" : "%",
              "system" : "http://unitsofmeasure.org",
              "code" : "%"
            }
          }
        }]
      }]
    }

Response Headers

    HTTP/1.1 200 OK
    Server: nginx/1.14.0 (Ubuntu)
    Date: Fri, 23 Oct 2020 04:54:56 GMT
    Content-Type: application/fhir+json;charset=utf-8
    ...(other headers)

### Signatures

This specification does not require signatures but supports the transmission of signatures if business agreements require them.

Some data consumers may require that the data they receive be signed. When signatures are required, the following general rules apply:

- The signature represents a provider signature attesting that the information is true and accurate to the best of their knowledge.*
- The returned information is either:
  - inherently signed (for example, a wet signature on a PDF or a digitally signed CCDA)
  - or Transformed into a signed FHIR Document with the signature in the `Bundle.signature`
  - or a signed QuestionnaireResponse with the signature in the Signature Extension.

* Consult with your Payer and your legal team for questions regarding legal liability associated with sharing and signing data.

#### The Payer Requirements

- For Unsolicited Attachments, the Payer pre-negotiates with the Provider whether electronic or digital signatures are required. If signatures are required, all attachments will be signed by the provider submitting them.
- For Solicited Attachments, the Payer pre-negotiates with the Provider whether electronic or digital signatures are required for:
  1. all attachments
  2. or only for attachments where the attachment request communicates the signature requirement using the `Task.input` "signature" input parameter.
- The Payer/Requester follows the documentation on the Signatures page to validate signatures.
  - If the signatures fail verification when processing the `$submit-attachment` operation, the Data Source/Responder SHALL return an HTTP `400 Bad Request` and an OperationOutcome declaring that the signature was invalid.

#### Provider Requirements

- The Data Source follows the documentation on the Signatures page for producing signatures.
- When an electronic or digital signature is required, the Data Source returns either:
  1. document(s) that are already inherently signed
  2. FHIR resource(s) transformed into a signed FHIR Document.
  3. or for requests using Questionnaire, a signed FHIR QuestionnaireResponse.
- if multiple documents need to be signed, systems should minimize the number of interactions required by the user

- As discussed in the What is Signed section, a signed FHIR document could have objects that are individually signed within it as well. Therefore, if the Consumer/Requester incorrectly assumed there would be a signature (wet, electronic, or digital) on an individual returned object (e.g., CCDA, PDF, Image, CDA on FHIR, QuestionnaireResponse ), they can re-request the data using a Task-based request and use the `Task.input` signature flag to indicate that the Data Source needs to sign it.

- In this example, the Provider submits a patient's active conditions to the Payer to support a claim. Unlike Scenario 1, which uses DocumentReference resources to index the C-CDA attachment, FHIR resources representing the patient's active conditions are transformed into a digitally signed FHIR Document bundle.
- See the Signatures page for a detailed explanation of how the signature was created and verified.

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "21234657"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "234567"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11503-0",
              "display" : "Medical records"
            }],
            "text" : "Medical records"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "Bundle",
            "id" : "cdex-document-digital-sig-example",
            "identifier" : {
              "system" : "urn:ietf:rfc:3986",
              "value" : "urn:uuid:c173535e-135e-48e3-ab64-38bacc68dba8"
            },
            "type" : "document",
            "timestamp" : "2021-10-25T20:16:29-07:00",
            "entry" : [{
              "fullUrl" : "urn:uuid:17a80a8d-4cf1-4deb-a1fd-2db1130e5f76",
              "resource" : {
                "resourceType" : "Composition",
                "id" : "17a80a8d-4cf1-4deb-a1fd-2db1130e5f76",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Composition_17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a><p><b>Generated Narrative: Composition</b><a name=\"17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a><a name=\"hc17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Composition &quot;17a80a8d-4cf1-4deb-a1fd-2db1130e5f76&quot; </p></div><p><b>status</b>: final</p><p><b>type</b>: Medical records <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#11503-0)</span></p><p><b>encounter</b>: See on this page: urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112: Example Encounter</p><p><b>date</b>: 2021-10-25 20:16:29-0700</p><p><b>author</b>: See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: Example Practitioner</p><p><b>title</b>: Active Conditions</p><h3>Attesters</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Mode</b></td><td><b>Time</b></td><td><b>Party</b></td></tr><tr><td style=\"display: none\">*</td><td>legal</td><td>2021-10-25 20:16:29-0700</td><td>See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: Example Practitioner</td></tr></table></div>"
                },
                "status" : "final",
                "type" : {
                  "coding" : [{
                    "system" : "http://loinc.org",
                    "code" : "11503-0"
                  }],
                  "text" : "Medical records"
                },
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                  "display" : "Example Patient"
                },
                "encounter" : {
                  "reference" : "urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112",
                  "display" : "Example Encounter"
                },
                "date" : "2021-10-25T20:16:29-07:00",
                "author" : [{
                  "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                  "display" : "Example Practitioner"
                }],
                "title" : "Active Conditions",
                "attester" : [{
                  "mode" : "legal",
                  "time" : "2021-10-25T20:16:29-07:00",
                  "party" : {
                    "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                    "display" : "Example Practitioner"
                  }
                }],
                "section" : [{
                  "title" : "Active Condition 1",
                  "entry" : [{
                    "reference" : "urn:uuid:014a68ec-d691-49e0-b980-91b0d924e570"
                  }]
                }]
              }
            },
            {
              "fullUrl" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
              "resource" : {
                "resourceType" : "Practitioner",
                "id" : "0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                "meta" : {
                  "lastUpdated" : "2013-05-05T16:13:03Z"
                },
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Practitioner_0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a><p><b>Generated Narrative: Practitioner</b><a name=\"0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a><a name=\"hc0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Practitioner &quot;0820c16d-91de-4dfa-a3a6-f140a516a9bc&quot; Updated &quot;2013-05-05 16:13:03+0000&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-practitioner.html\">US Core Practitioner Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: <a href=\"http://terminology.hl7.org/5.3.0/NamingSystem-npi.html\" title=\"National Provider Identifier\">United States National Provider Identifier</a>/9941339100</p><p><b>name</b>: John Hancock </p></div>"
                },
                "identifier" : [{
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "9941339100"
                }],
                "name" : [{
                  "family" : "Hancock",
                  "given" : ["John"]
                }]
              }
            },
            {
              "fullUrl" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
              "resource" : {
                "resourceType" : "Patient",
                "id" : "970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Patient_970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a><p><b>Generated Narrative: Patient</b><a name=\"970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a><a name=\"hc970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Patient &quot;970af6c9-5bbd-4067-b6c1-d9b2c823aece&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-patient.html\">US Core Patient Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: Member Number/Member123</p><p><b>active</b>: true</p><p><b>name</b>: CDEX Example Patient</p><p><b>gender</b>: male</p></div>"
                },
                "identifier" : [{
                  "type" : {
                    "coding" : [{
                      "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                      "code" : "MB"
                    }]
                  },
                  "system" : "http://example.org/cdex/payer/member-ids",
                  "value" : "Member123"
                }],
                "active" : true,
                "name" : [{
                  "text" : "CDEX Example Patient",
                  "family" : "Patient",
                  "given" : ["CDEX Example"]
                }],
                "gender" : "male"
              }
            },
            {
              "fullUrl" : "urn:uuid:014a68ec-d691-49e0-b980-91b0d924e570",
              "resource" : {
                "resourceType" : "Condition",
                "id" : "014a68ec-d691-49e0-b980-91b0d924e570",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Condition_014a68ec-d691-49e0-b980-91b0d924e570\"> </a><p><b>Generated Narrative: Condition</b><a name=\"014a68ec-d691-49e0-b980-91b0d924e570\"> </a><a name=\"hc014a68ec-d691-49e0-b980-91b0d924e570\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Condition &quot;014a68ec-d691-49e0-b980-91b0d924e570&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-condition-problems-health-concerns.html\">US Core Condition Problems and Health Concerns Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: <code>urn:oid:1.3.6.1.4.1.22812.4.111.0.4.1.2.1</code>/1</p><p><b>clinicalStatus</b>: Active <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-clinical.html\">Condition Clinical Status Codes</a>#active)</span></p><p><b>category</b>: Problem List Item <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-category.html\">Condition Category Codes</a>#problem-list-item)</span></p><p><b>code</b>: Type 2 Diabetes Mellitus <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#44054006)</span></p><p><b>subject</b>: See on this page: urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece</p><p><b>onset</b>: 2006</p><p><b>asserter</b>: See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc</p></div>"
                },
                "identifier" : [{
                  "system" : "urn:oid:1.3.6.1.4.1.22812.4.111.0.4.1.2.1",
                  "value" : "1"
                }],
                "clinicalStatus" : {
                  "coding" : [{
                    "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
                    "code" : "active"
                  }]
                },
                "category" : [{
                  "coding" : [{
                    "system" : "http://terminology.hl7.org/CodeSystem/condition-category",
                    "code" : "problem-list-item",
                    "display" : "Problem List Item"
                  }],
                  "text" : "Problem List Item"
                }],
                "code" : {
                  "coding" : [{
                    "system" : "http://snomed.info/sct",
                    "code" : "44054006",
                    "display" : "Type 2 Diabetes Mellitus"
                  }]
                },
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece"
                },
                "onsetDateTime" : "2006",
                "asserter" : {
                  "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc"
                }
              }
            },
            {
              "fullUrl" : "urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112",
              "resource" : {
                "resourceType" : "Encounter",
                "id" : "5ce5c83a-000f-47d2-941c-039358cc9112",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Encounter_5ce5c83a-000f-47d2-941c-039358cc9112\"> </a><p><b>Generated Narrative: Encounter</b><a name=\"5ce5c83a-000f-47d2-941c-039358cc9112\"> </a><a name=\"hc5ce5c83a-000f-47d2-941c-039358cc9112\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Encounter &quot;5ce5c83a-000f-47d2-941c-039358cc9112&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-encounter.html\">US Core Encounter Profile (version 6.1.0)</a></p></div><p><b>status</b>: finished</p><p><b>class</b>: emergency (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code EMER = 'emergency', stated as 'null')</p><p><b>type</b>: Unknown (qualifier value) <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#261665006)</span></p><p><b>subject</b>: See on this page: urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece: CDEX Example Patient</p><h3>Participants</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Individual</b></td></tr><tr><td style=\"display: none\">*</td><td>See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: John Hancock</td></tr></table><p><b>period</b>: 2021-10-25 20:10:29-0700 --&gt; 2021-10-25 20:16:29-0700</p><p><b>serviceProvider</b>: See on this page: urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3: CDEX Example Organization</p></div>"
                },
                "status" : "finished",
                "class" : {
                  "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
                  "code" : "EMER"
                },
                "type" : [{
                  "coding" : [{
                    "system" : "http://snomed.info/sct",
                    "code" : "261665006",
                    "display" : "Unknown (qualifier value)"
                  }],
                  "text" : "Unknown (qualifier value)"
                }],
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                  "display" : "CDEX Example Patient"
                },
                "participant" : [{
                  "individual" : {
                    "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                    "display" : "John Hancock"
                  }
                }],
                "period" : {
                  "start" : "2021-10-25T20:10:29-07:00",
                  "end" : "2021-10-25T20:16:29-07:00"
                },
                "serviceProvider" : {
                  "reference" : "urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3",
                  "display" : "CDEX Example Organization"
                }
              }
            },
            {
              "fullUrl" : "urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3",
              "resource" : {
                "resourceType" : "Organization",
                "id" : "e37f004b-dc10-422b-b833-cdaa10a055a3",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Organization_e37f004b-dc10-422b-b833-cdaa10a055a3\"> </a><p><b>Generated Narrative: Organization</b><a name=\"e37f004b-dc10-422b-b833-cdaa10a055a3\"> </a><a name=\"hce37f004b-dc10-422b-b833-cdaa10a055a3\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Organization &quot;e37f004b-dc10-422b-b833-cdaa10a055a3&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-organization.html\">US Core Organization Profile (version 6.1.0)</a></p></div><p><b>active</b>: true</p><p><b>name</b>: CDEX Example Organization</p><p><b>telecom</b>: ph: (+1) 555-555-5555, <a href=\"mailto:customer-service@example.org\">customer-service@example.org</a></p><p><b>address</b>: 1 CDEX Lane Boston MA 01002 USA </p></div>"
                },
                "identifier" : [{
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "1234567893"
                }],
                "active" : true,
                "name" : "CDEX Example Organization",
                "telecom" : [{
                  "system" : "phone",
                  "value" : "(+1) 555-555-5555"
                },
                {
                  "system" : "email",
                  "value" : "customer-service@example.org"
                }],
                "address" : [{
                  "line" : ["1 CDEX Lane"],
                  "city" : "Boston",
                  "state" : "MA",
                  "postalCode" : "01002",
                  "country" : "USA"
                }]
              }
            }],
            "signature" : {
              "type" : [{
                "system" : "urn:iso-astm:E1762-95:2013",
                "code" : "1.2.840.10065.1.12.1.5",
                "display" : "Verification Signature"
              }],
              "when" : "2021-10-05T22:42:19-07:00",
              "who" : {
                "reference" : "https://example.org/Practitioner/123"
              },
              "onBehalfOf" : {
                "reference" : "https://example.org/Organization/123"
              },
              "data" : " "
            }
          }
        }]
      }]
    }

Response Headers

    HTTP/1.1 200 OK
    Server: nginx/1.14.0 (Ubuntu)
    Date: Fri, 23 Oct 2020 04:54:56 GMT
    Content-Type: application/fhir+json;charset=utf-8
    ...(other headers)

#### Example: The Signature Cannot Be Verified

This example is the same as the previous one, except the digital signature cannot be verified. However, the interaction it illustrates would be the same whether the attachment was a digitally signed C-CDA, FHIR Document, or QuestionnaireResponse.

- In this example, the Provider submits the patient's active conditions to the Payer to support a claim.
- Unlike the previous example, the Payer cannot verify the signature because the certificate is expired.
- An HTTP `400 Bad Request` and OperationOutcome are returned.

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "21234657"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "234567"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11503-0",
              "display" : "Medical records"
            }],
            "text" : "Medical records"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "Bundle",
            "id" : "cdex-document-digital-sig-example",
            "identifier" : {
              "system" : "urn:ietf:rfc:3986",
              "value" : "urn:uuid:c173535e-135e-48e3-ab64-38bacc68dba8"
            },
            "type" : "document",
            "timestamp" : "2021-10-25T20:16:29-07:00",
            "entry" : [{
              "fullUrl" : "urn:uuid:17a80a8d-4cf1-4deb-a1fd-2db1130e5f76",
              "resource" : {
                "resourceType" : "Composition",
                "id" : "17a80a8d-4cf1-4deb-a1fd-2db1130e5f76",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Composition_17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a><p><b>Generated Narrative: Composition</b><a name=\"17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a><a name=\"hc17a80a8d-4cf1-4deb-a1fd-2db1130e5f76\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Composition &quot;17a80a8d-4cf1-4deb-a1fd-2db1130e5f76&quot; </p></div><p><b>status</b>: final</p><p><b>type</b>: Medical records <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#11503-0)</span></p><p><b>encounter</b>: See on this page: urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112: Example Encounter</p><p><b>date</b>: 2021-10-25 20:16:29-0700</p><p><b>author</b>: See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: Example Practitioner</p><p><b>title</b>: Active Conditions</p><h3>Attesters</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Mode</b></td><td><b>Time</b></td><td><b>Party</b></td></tr><tr><td style=\"display: none\">*</td><td>legal</td><td>2021-10-25 20:16:29-0700</td><td>See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: Example Practitioner</td></tr></table></div>"
                },
                "status" : "final",
                "type" : {
                  "coding" : [{
                    "system" : "http://loinc.org",
                    "code" : "11503-0"
                  }],
                  "text" : "Medical records"
                },
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                  "display" : "Example Patient"
                },
                "encounter" : {
                  "reference" : "urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112",
                  "display" : "Example Encounter"
                },
                "date" : "2021-10-25T20:16:29-07:00",
                "author" : [{
                  "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                  "display" : "Example Practitioner"
                }],
                "title" : "Active Conditions",
                "attester" : [{
                  "mode" : "legal",
                  "time" : "2021-10-25T20:16:29-07:00",
                  "party" : {
                    "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                    "display" : "Example Practitioner"
                  }
                }],
                "section" : [{
                  "title" : "Active Condition 1",
                  "entry" : [{
                    "reference" : "urn:uuid:014a68ec-d691-49e0-b980-91b0d924e570"
                  }]
                }]
              }
            },
            {
              "fullUrl" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
              "resource" : {
                "resourceType" : "Practitioner",
                "id" : "0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                "meta" : {
                  "lastUpdated" : "2013-05-05T16:13:03Z"
                },
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Practitioner_0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a><p><b>Generated Narrative: Practitioner</b><a name=\"0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a><a name=\"hc0820c16d-91de-4dfa-a3a6-f140a516a9bc\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Practitioner &quot;0820c16d-91de-4dfa-a3a6-f140a516a9bc&quot; Updated &quot;2013-05-05 16:13:03+0000&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-practitioner.html\">US Core Practitioner Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: <a href=\"http://terminology.hl7.org/5.3.0/NamingSystem-npi.html\" title=\"National Provider Identifier\">United States National Provider Identifier</a>/9941339100</p><p><b>name</b>: John Hancock </p></div>"
                },
                "identifier" : [{
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "9941339100"
                }],
                "name" : [{
                  "family" : "Hancock",
                  "given" : ["John"]
                }]
              }
            },
            {
              "fullUrl" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
              "resource" : {
                "resourceType" : "Patient",
                "id" : "970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Patient_970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a><p><b>Generated Narrative: Patient</b><a name=\"970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a><a name=\"hc970af6c9-5bbd-4067-b6c1-d9b2c823aece\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Patient &quot;970af6c9-5bbd-4067-b6c1-d9b2c823aece&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-patient.html\">US Core Patient Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: Member Number/Member123</p><p><b>active</b>: true</p><p><b>name</b>: CDEX Example Patient</p><p><b>gender</b>: male</p></div>"
                },
                "identifier" : [{
                  "type" : {
                    "coding" : [{
                      "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                      "code" : "MB"
                    }]
                  },
                  "system" : "http://example.org/cdex/payer/member-ids",
                  "value" : "Member123"
                }],
                "active" : true,
                "name" : [{
                  "text" : "CDEX Example Patient",
                  "family" : "Patient",
                  "given" : ["CDEX Example"]
                }],
                "gender" : "male"
              }
            },
            {
              "fullUrl" : "urn:uuid:014a68ec-d691-49e0-b980-91b0d924e570",
              "resource" : {
                "resourceType" : "Condition",
                "id" : "014a68ec-d691-49e0-b980-91b0d924e570",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Condition_014a68ec-d691-49e0-b980-91b0d924e570\"> </a><p><b>Generated Narrative: Condition</b><a name=\"014a68ec-d691-49e0-b980-91b0d924e570\"> </a><a name=\"hc014a68ec-d691-49e0-b980-91b0d924e570\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Condition &quot;014a68ec-d691-49e0-b980-91b0d924e570&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-condition-problems-health-concerns.html\">US Core Condition Problems and Health Concerns Profile (version 6.1.0)</a></p></div><p><b>identifier</b>: <code>urn:oid:1.3.6.1.4.1.22812.4.111.0.4.1.2.1</code>/1</p><p><b>clinicalStatus</b>: Active <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-clinical.html\">Condition Clinical Status Codes</a>#active)</span></p><p><b>category</b>: Problem List Item <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/5.5.0/CodeSystem-condition-category.html\">Condition Category Codes</a>#problem-list-item)</span></p><p><b>code</b>: Type 2 Diabetes Mellitus <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#44054006)</span></p><p><b>subject</b>: See on this page: urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece</p><p><b>onset</b>: 2006</p><p><b>asserter</b>: See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc</p></div>"
                },
                "identifier" : [{
                  "system" : "urn:oid:1.3.6.1.4.1.22812.4.111.0.4.1.2.1",
                  "value" : "1"
                }],
                "clinicalStatus" : {
                  "coding" : [{
                    "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical",
                    "code" : "active"
                  }]
                },
                "category" : [{
                  "coding" : [{
                    "system" : "http://terminology.hl7.org/CodeSystem/condition-category",
                    "code" : "problem-list-item",
                    "display" : "Problem List Item"
                  }],
                  "text" : "Problem List Item"
                }],
                "code" : {
                  "coding" : [{
                    "system" : "http://snomed.info/sct",
                    "code" : "44054006",
                    "display" : "Type 2 Diabetes Mellitus"
                  }]
                },
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece"
                },
                "onsetDateTime" : "2006",
                "asserter" : {
                  "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc"
                }
              }
            },
            {
              "fullUrl" : "urn:uuid:5ce5c83a-000f-47d2-941c-039358cc9112",
              "resource" : {
                "resourceType" : "Encounter",
                "id" : "5ce5c83a-000f-47d2-941c-039358cc9112",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Encounter_5ce5c83a-000f-47d2-941c-039358cc9112\"> </a><p><b>Generated Narrative: Encounter</b><a name=\"5ce5c83a-000f-47d2-941c-039358cc9112\"> </a><a name=\"hc5ce5c83a-000f-47d2-941c-039358cc9112\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Encounter &quot;5ce5c83a-000f-47d2-941c-039358cc9112&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-encounter.html\">US Core Encounter Profile (version 6.1.0)</a></p></div><p><b>status</b>: finished</p><p><b>class</b>: emergency (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code EMER = 'emergency', stated as 'null')</p><p><b>type</b>: Unknown (qualifier value) <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#261665006)</span></p><p><b>subject</b>: See on this page: urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece: CDEX Example Patient</p><h3>Participants</h3><table class=\"grid\"><tr><td style=\"display: none\">-</td><td><b>Individual</b></td></tr><tr><td style=\"display: none\">*</td><td>See on this page: urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc: John Hancock</td></tr></table><p><b>period</b>: 2021-10-25 20:10:29-0700 --&gt; 2021-10-25 20:16:29-0700</p><p><b>serviceProvider</b>: See on this page: urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3: CDEX Example Organization</p></div>"
                },
                "status" : "finished",
                "class" : {
                  "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode",
                  "code" : "EMER"
                },
                "type" : [{
                  "coding" : [{
                    "system" : "http://snomed.info/sct",
                    "code" : "261665006",
                    "display" : "Unknown (qualifier value)"
                  }],
                  "text" : "Unknown (qualifier value)"
                }],
                "subject" : {
                  "reference" : "urn:uuid:970af6c9-5bbd-4067-b6c1-d9b2c823aece",
                  "display" : "CDEX Example Patient"
                },
                "participant" : [{
                  "individual" : {
                    "reference" : "urn:uuid:0820c16d-91de-4dfa-a3a6-f140a516a9bc",
                    "display" : "John Hancock"
                  }
                }],
                "period" : {
                  "start" : "2021-10-25T20:10:29-07:00",
                  "end" : "2021-10-25T20:16:29-07:00"
                },
                "serviceProvider" : {
                  "reference" : "urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3",
                  "display" : "CDEX Example Organization"
                }
              }
            },
            {
              "fullUrl" : "urn:uuid:e37f004b-dc10-422b-b833-cdaa10a055a3",
              "resource" : {
                "resourceType" : "Organization",
                "id" : "e37f004b-dc10-422b-b833-cdaa10a055a3",
                "text" : {
                  "status" : "generated",
                  "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><a name=\"Organization_e37f004b-dc10-422b-b833-cdaa10a055a3\"> </a><p><b>Generated Narrative: Organization</b><a name=\"e37f004b-dc10-422b-b833-cdaa10a055a3\"> </a><a name=\"hce37f004b-dc10-422b-b833-cdaa10a055a3\"> </a></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Organization &quot;e37f004b-dc10-422b-b833-cdaa10a055a3&quot; </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"http://hl7.org/fhir/us/core/STU6.1/StructureDefinition-us-core-organization.html\">US Core Organization Profile (version 6.1.0)</a></p></div><p><b>active</b>: true</p><p><b>name</b>: CDEX Example Organization</p><p><b>telecom</b>: ph: (+1) 555-555-5555, <a href=\"mailto:customer-service@example.org\">customer-service@example.org</a></p><p><b>address</b>: 1 CDEX Lane Boston MA 01002 USA </p></div>"
                },
                "identifier" : [{
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "1234567893"
                }],
                "active" : true,
                "name" : "CDEX Example Organization",
                "telecom" : [{
                  "system" : "phone",
                  "value" : "(+1) 555-555-5555"
                },
                {
                  "system" : "email",
                  "value" : "customer-service@example.org"
                }],
                "address" : [{
                  "line" : ["1 CDEX Lane"],
                  "city" : "Boston",
                  "state" : "MA",
                  "postalCode" : "01002",
                  "country" : "USA"
                }]
              }
            }],
            "signature" : {
              "type" : [{
                "system" : "urn:iso-astm:E1762-95:2013",
                "code" : "1.2.840.10065.1.12.1.5",
                "display" : "Verification Signature"
              }],
              "when" : "2021-10-05T22:42:19-07:00",
              "who" : {
                "reference" : "https://example.org/Practitioner/123"
              },
              "onBehalfOf" : {
                "reference" : "https://example.org/Organization/123"
              },
              "data" : " "
            }
          }
        }]
      }]
    }

Response Headers

      HTTP/1.1 400 Bad Request
      [other headers]

Response Body

      {
        "resourceType": "OperationOutcome",
        "id": "submit-attachment-1672516533834,
        "issue": [
      {
        "severity": "error",
        "code": "business-rule",
        "details": {
          "text": "The signature cannot be verified because the certificate is expired"
        },
        "diagnostics": "Resubmit with valid digital signature"
      }
        ]
      }

#### Example: Signature Missing

This example is the same as Scenario 1 above, except a digital signature is required but is absent. The interaction it illustrates would be the same whether the attachment was a digitally signed C-CDA, FHIR Document, or QuestionnaireResponse.

- The Provider submits CCDA Documents as additional documentation for a claim.
- The attachment is an unsigned CCDA document, and the Payer requires a digital signature in this scenario.
- An HTTP `400 Bad Request` and OperationOutcome are returned.

Request

    POST [base]/$submit-attachment

Request Headers

    Accept: application/fhir+json
    Content-Type: application/fhir+json
    ...(other headers)

Request Body

    {
      "resourceType" : "Parameters",
      "parameter" : [{
        "name" : "TrackingId",
        "valueIdentifier" : {
          "system" : "http://example.org/provider",
          "value" : "11234657"
        }
      },
      {
        "name" : "AttachTo",
        "valueCode" : "claim"
      },
      {
        "name" : "PayerId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/payer-ids",
          "value" : "payer123"
        }
      },
      {
        "name" : "OrganizationId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "1407071236"
        }
      },
      {
        "name" : "ProviderId",
        "valueIdentifier" : {
          "system" : "http://hl7.org/fhir/sid/us-npi",
          "value" : "9941339108"
        }
      },
      {
        "name" : "MemberId",
        "valueIdentifier" : {
          "system" : "http://example.org/cdex/member-ids",
          "value" : "234567"
        }
      },
      {
        "name" : "ServiceDate",
        "valueDateTime" : "2022-06-16"
      },
      {
        "name" : "Attachment",
        "part" : [{
          "name" : "LineItem",
          "valueString" : "1"
        },
        {
          "name" : "LineItem",
          "valueString" : "2"
        },
        {
          "name" : "LineItem",
          "valueString" : "3"
        },
        {
          "name" : "Code",
          "valueCodeableConcept" : {
            "coding" : [{
              "system" : "http://loinc.org",
              "code" : "11504-8",
              "display" : "Surgical operation note"
            }],
            "text" : "Surgical operation note"
          }
        },
        {
          "name" : "Content",
          "resource" : {
            "resourceType" : "DocumentReference",
            "status" : "current",
            "type" : {
              "coding" : [{
                "system" : "http://loinc.org",
                "code" : "11504-8",
                "display" : "Surgical operation note"
              }],
              "text" : "Surgical operation note"
            },
            "category" : [{
              "coding" : [{
                "system" : "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category",
                "code" : "clinical-note",
                "display" : "Clinical Note"
              }],
              "text" : "Clinical Note 1"
            }],
            "subject" : {
              "identifier" : {
                "system" : "http://example.org/cdex/member-ids",
                "value" : "234567"
              }
            },
            "date" : "2022-07-13T10:30:00-05:00",
            "content" : [{
              "attachment" : {
                "contentType" : "text/xml",
                "data" : " ",
                "hash" : "026d568297832e6e083e96549041a72aa383bb23",
                "title" : "Example CCDA"
              }
            }]
          }
        }]
      }]
    }

Response Headers

      HTTP/1.1 400 Bad Request
      [other headers]

Response Body

      {
        "resourceType": "OperationOutcome",
        "id": "1672516634680",
        "issue": [
      {
        "severity": "error",
        "code": "business-rule",
        "details": {
          "text": "This health care attachments transactions requires a digital signature"
        },
        "diagnostics": "Resubmit with valid digital signature"
      }
        ]
      }