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

Da Vinci Clinical Data Exchange (CDex), published by HL7 International / Payer/Provider Information Exchange Work Group. This guide is not an authorized publication; it is the continuous build for version 2.1.0 built by the FHIR (HL7® FHIR® Standard) CI Build. This version is based on the current content of https://github.com/HL7/davinci-ecdx/ and changes regularly. See the Directory of published versions

## 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

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.

FHIR operations are based on the RPC-like paradigm where the target is treated as a "Black Box", a system where the internal workings are not known. Therefore, the acceptance or failure of the $submit-attachment operation depends on the Payer server's internal business rules and workflow.

1. 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.
Administrative Reference Number | AdminRefNumber | - | This payer assigned identifier is only for prior authorization solicited attachments.
Use | AttachTo | Claim | Choice of "claim" or "preauthorization"
Payer ID | PayerId | Loop: 1000A Segment: NM109 | Payer ID
Payer URL | (operation endpoint) | - | See the Endpoint Discovery Strategy documented in the Da Vinci Health Record Exchange (HRex) Impelementation guide
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" : "Am1WgpeDLm4IPpZUkEGnKqODuyM=",
                "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" : "Am1WgpeDLm4IPpZUkEGnKqODuyM=",
                "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)

### Large Payloads

This section outlines the Payer server requirements and guidelines for managing large payloads in the $submit-attachment operation, specifying size limits, error handling, and alternative submission methods.

1. Servers SHALL document in their Capability Statement's `CapabilityStatement,operation.documentation` element or payer-supplied documentation:
   1. The payload endpoint size limits (e.g. 100MB )
   2. Whether they support the $ submit-attachment's final input parameter

2. When the payload is too big, the Server SHALL use The HTTP `413 Content Too Large` client error response status code (alternate status messages "Request Entity Too Large" or "Payload Too Large").

3. Servers SHALL document instructions for the Client when the payload is (or is anticipated to be) too big. (for example, send a URL + authorization information, offload to external storage, split multiple files into multiple operations)

### 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><h3>Medical Records Document</h3><p>This document, titled &quot;Active Conditions,&quot; was created on October 25, 2021, by Dr. John Hancock, who also legally attested to its accuracy on the same date. It summarizes the active medical conditions for a patient based on an emergency encounter on October 25, 2021. The document includes one section detailing an active condition: Type 2 Diabetes Mellitus.</p></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><h3>Practitioner Information</h3><p>Dr. John Hancock is a healthcare provider with National Provider Identifier (NPI) 9941339100. He authored and attested to the medical records document.</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><h3>Patient Information</h3><p>CDEX Example Patient, a male, is identified by member ID Member123 in the payer system http://example.org/cdex/payer/member-ids. He is the subject of this medical records document. The patient said, &quot;I feel great!&quot;</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><h3>Active Condition</h3><p>The patient has an active diagnosis of Type 2 Diabetes Mellitus (SNOMED CT: 44054006), first identified in 2006. This condition was documented by Dr. John Hancock and is listed as a problem on the patient’s problem list.</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><h3>Encounter Details</h3><p>An emergency encounter occurred on October 25, 2021, from 8:10 PM to 8:16 PM, involving CDEX Example Patient and attended by Dr. John Hancock at CDEX Example Organization. The encounter type is unspecified (SNOMED CT: 261665006).</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><h3>Organization Information</h3><p>CDEX Example Organization, located at 1 CDEX Lane, Boston, MA 01002, USA, is the service provider for the documented encounter. Contact details include phone: (+1) 555-555-5555 and email: customer-service@example.org. The organization's NPI is 1234567893.</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" : "2020-10-23T04:54:56.048+00:00",
              "who" : {
                "identifier" : {
                  "type" : {
                    "coding" : [{
                      "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                      "code" : "NPI"
                    }]
                  },
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "9941339100"
                },
                "display" : "John Hancock, MD"
              },
              "onBehalfOf" : {
                "identifier" : {
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "1234567893"
                }
              },
              "targetFormat" : "application/fhir+json;canonicalization=http://hl7.org/fhir/canonicalization/json#document",
              "sigFormat" : "application/jose",
              "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><h3>Medical Records Document</h3><p>This document, titled &quot;Active Conditions,&quot; was created on October 25, 2021, by Dr. John Hancock, who also legally attested to its accuracy on the same date. It summarizes the active medical conditions for a patient based on an emergency encounter on October 25, 2021. The document includes one section detailing an active condition: Type 2 Diabetes Mellitus.</p></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><h3>Practitioner Information</h3><p>Dr. John Hancock is a healthcare provider with National Provider Identifier (NPI) 9941339100. He authored and attested to the medical records document.</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><h3>Patient Information</h3><p>CDEX Example Patient, a male, is identified by member ID Member123 in the payer system http://example.org/cdex/payer/member-ids. He is the subject of this medical records document. The patient said, &quot;I feel great!&quot;</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><h3>Active Condition</h3><p>The patient has an active diagnosis of Type 2 Diabetes Mellitus (SNOMED CT: 44054006), first identified in 2006. This condition was documented by Dr. John Hancock and is listed as a problem on the patient’s problem list.</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><h3>Encounter Details</h3><p>An emergency encounter occurred on October 25, 2021, from 8:10 PM to 8:16 PM, involving CDEX Example Patient and attended by Dr. John Hancock at CDEX Example Organization. The encounter type is unspecified (SNOMED CT: 261665006).</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><h3>Organization Information</h3><p>CDEX Example Organization, located at 1 CDEX Lane, Boston, MA 01002, USA, is the service provider for the documented encounter. Contact details include phone: (+1) 555-555-5555 and email: customer-service@example.org. The organization's NPI is 1234567893.</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" : "2020-10-23T04:54:56.048+00:00",
              "who" : {
                "identifier" : {
                  "type" : {
                    "coding" : [{
                      "system" : "http://terminology.hl7.org/CodeSystem/v2-0203",
                      "code" : "NPI"
                    }]
                  },
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "9941339100"
                },
                "display" : "John Hancock, MD"
              },
              "onBehalfOf" : {
                "identifier" : {
                  "system" : "http://hl7.org/fhir/sid/us-npi",
                  "value" : "1234567893"
                }
              },
              "targetFormat" : "application/fhir+json;canonicalization=http://hl7.org/fhir/canonicalization/json#document",
              "sigFormat" : "application/jose",
              "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" : "Am1WgpeDLm4IPpZUkEGnKqODuyM=",
                "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"
      }
        ]
      }