{
  "resourceType": "StructureDefinition",
  "id": "DocumentManifest",
  "meta": {
    "lastUpdated": "2021-01-01T21:58:31.578+00:00"
  },
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-category",
      "valueString": "Foundation.Documents"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category",
      "valueCode": "not-classified"
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg",
      "valueCode": "sd"
    },
    {
      "url": "http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status",
      "valueCode": ".status = entered-in-error"
    }
  ],
  "url": "http://hl7.org/fhir/StructureDefinition/DocumentManifest",
  "version": "4.6.0",
  "name": "DocumentManifest",
  "status": "draft",
  "date": "2021-01-01T21:58:31+00:00",
  "publisher": "Health Level Seven International (Structured Documents)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/fhir"
        }
      ]
    },
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://www.hl7.org/Special/committees/structure/index.cfm"
        }
      ]
    }
  ],
  "description": "A collection of documents compiled for a purpose together with metadata that applies to the collection.",
  "fhirVersion": "4.6.0",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "xds",
      "uri": "http://ihe.net/xds",
      "name": "XDS metadata equivalent"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "DocumentManifest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/DomainResource",
  "derivation": "specialization",
  "differential": {
    "element": [
      {
        "id": "DocumentManifest",
        "path": "DocumentManifest",
        "short": "A list that defines a set of documents",
        "definition": "A collection of documents compiled for a purpose together with metadata that applies to the collection.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event"
          },
          {
            "identity": "rim",
            "map": "Act[classCode=FOLDER, moodCode=EVN]"
          },
          {
            "identity": "w5",
            "map": "infrastructure.documents"
          }
        ]
      },
      {
        "id": "DocumentManifest.masterIdentifier",
        "path": "DocumentManifest.masterIdentifier",
        "short": "Unique Identifier for the set of documents",
        "definition": "A single identifier that uniquely identifies this manifest. Principally used to refer to the manifest in non-FHIR contexts.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.identifier"
          },
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "rim",
            "map": "id [need a list semantic to indicate order matters]"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.uniqueId"
          }
        ]
      },
      {
        "id": "DocumentManifest.identifier",
        "path": "DocumentManifest.identifier",
        "short": "Other identifiers for the manifest",
        "definition": "Other identifiers associated with the document manifest, including version independent  identifiers.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.identifier"
          },
          {
            "identity": "w5",
            "map": "FiveWs.identifier"
          },
          {
            "identity": "v2",
            "map": "TXA-16-Unique Document File Name?"
          },
          {
            "identity": "rim",
            "map": ".id / .setId"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.entryUUID"
          }
        ]
      },
      {
        "id": "DocumentManifest.status",
        "path": "DocumentManifest.status",
        "short": "current | superseded | entered-in-error",
        "definition": "The status of this document manifest.",
        "comment": "This element is labeled as a modifier because the status contains the codes that mark the manifest as not currently valid.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "isModifier": true,
        "isModifierReason": "This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid",
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "DocumentReferenceStatus"
            },
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean": true
            },
            {
              "url": "http://hl7.org/fhir/build/StructureDefinition/v3-map",
              "valueString": "http://terminology.hl7.org/ValueSet/v3-ActStatus"
            }
          ],
          "strength": "required",
          "description": "The status of the document reference.",
          "valueSet": "http://hl7.org/fhir/ValueSet/document-reference-status"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.status"
          },
          {
            "identity": "w5",
            "map": "FiveWs.status"
          },
          {
            "identity": "rim",
            "map": ".statusCode"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet status"
          }
        ]
      },
      {
        "id": "DocumentManifest.type",
        "path": "DocumentManifest.type",
        "short": "Kind of document set",
        "definition": "The code specifying the type of clinical activity that resulted in placing the associated content into the DocumentManifest.",
        "comment": "Specifies the kind of this set of documents (e.g. Patient Summary, Discharge Summary, Prescription, etc.). The type of a set of documents may be the same as one of the documents in it - especially if there is only one - but it may be wider.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "isSummary": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "v3Act"
            }
          ],
          "strength": "example",
          "description": "The activity that caused the DocumentManifest to be created.",
          "valueSet": "http://terminology.hl7.org/ValueSet/v3-ActCode"
        },
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.code"
          },
          {
            "identity": "w5",
            "map": "FiveWs.class"
          },
          {
            "identity": "rim",
            "map": ".code"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.contentTypeCode"
          }
        ]
      },
      {
        "id": "DocumentManifest.subject",
        "path": "DocumentManifest.subject",
        "short": "The subject of the set of documents",
        "definition": "Who or what the set of documents is about. The documents can be about a person, (patient or healthcare practitioner), a device (i.e. machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure). If the documents cross more than one subject, then more than one subject is allowed here (unusual use case).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/Group",
              "http://hl7.org/fhir/StructureDefinition/Device"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.subject"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject[x]"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=SBJ].role"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.patientId"
          },
          {
            "identity": "w5",
            "map": "FiveWs.subject"
          }
        ]
      },
      {
        "id": "DocumentManifest.created",
        "path": "DocumentManifest.created",
        "short": "When this document manifest created",
        "definition": "When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated, etc.).",
        "comment": "Creation time is used for tracking, organizing versions and searching. This is the creation time of the document set, not the documents on which it is based.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.occurrence[x]"
          },
          {
            "identity": "w5",
            "map": "FiveWs.done[x]"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=AUT].time"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.submissionTime"
          }
        ]
      },
      {
        "id": "DocumentManifest.author",
        "path": "DocumentManifest.author",
        "short": "Who and/or what authored the DocumentManifest",
        "definition": "Identifies who is the author of the manifest. Manifest author is not necessarly the author of the references included.",
        "comment": "Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "http://hl7.org/fhir/StructureDefinition/Device",
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.performer.actor"
          },
          {
            "identity": "w5",
            "map": "FiveWs.author"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=AUT].role"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.author"
          }
        ]
      },
      {
        "id": "DocumentManifest.recipient",
        "path": "DocumentManifest.recipient",
        "short": "Intended to get notified about this set of documents",
        "definition": "A patient, practitioner, or organization for which this set of documents is intended.",
        "comment": "How the recipient receives the document set or is notified of it is up to the implementation. This element is just a statement of intent. If the recipient is a person, and it is not known whether the person is a patient or a practitioner, RelatedPerson would be the default choice.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Patient",
              "http://hl7.org/fhir/StructureDefinition/Practitioner",
              "http://hl7.org/fhir/StructureDefinition/PractitionerRole",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson",
              "http://hl7.org/fhir/StructureDefinition/Organization"
            ]
          }
        ],
        "mapping": [
          {
            "identity": "workflow",
            "map": "Event.performer"
          },
          {
            "identity": "w5",
            "map": "FiveWs.cause"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=IRCP].role"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.intendedRecipient"
          }
        ]
      },
      {
        "id": "DocumentManifest.source",
        "path": "DocumentManifest.source",
        "short": "The source system/application/software",
        "definition": "Identifies the source system, application, or software that produced the document manifest.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=PFM].time"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.sourceId"
          }
        ]
      },
      {
        "id": "DocumentManifest.description",
        "path": "DocumentManifest.description",
        "short": "Human-readable description (title)",
        "definition": "Human-readable description of the source document. This is sometimes known as the \"title\".",
        "comment": "What the document is about, rather than a terse summary of the document. It is commonly the case that records do not have a title and are collectively referred to by the display name of Record code (e.g. a \"consultation\" or \"progress note\").",
        "requirements": "Helps humans to assess whether the document is of interest.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".title"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet.title"
          }
        ]
      },
      {
        "id": "DocumentManifest.content",
        "path": "DocumentManifest.content",
        "short": "Items in manifest",
        "definition": "The list of Resources that consist of the parts of this manifest.",
        "comment": "When used for XDS the intended focus of the DocumentManifest is for the reference to target to be a set of DocumentReference Resources. The reference is to \"Any\" to support EN 13606 usage, where an extract is DocumentManifest that references  List and Composition resources.",
        "requirements": "Any Resources are allowed to be grouped in a Manifest. The manifest brings context to the group.",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ],
        "isSummary": true,
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=COMP].target"
          },
          {
            "identity": "xds",
            "map": "SubmissionSet DocumentEntry(s)"
          }
        ]
      },
      {
        "id": "DocumentManifest.related",
        "extension": [
          {
            "url": "http://hl7.org/fhir/build/StructureDefinition/uml-dir",
            "valueCode": "right"
          }
        ],
        "path": "DocumentManifest.related",
        "short": "Related things",
        "definition": "Related identifiers or resources associated with the DocumentManifest.",
        "comment": "May be identifiers or resources that caused the DocumentManifest to be created.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "BackboneElement"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "id": "DocumentManifest.related.identifier",
        "path": "DocumentManifest.related.identifier",
        "short": "Identifiers of things that are related",
        "definition": "Related identifier to this DocumentManifest.  For example, Order numbers, accession numbers, XDW workflow numbers.",
        "comment": "If both identifier and ref elements are present they shall refer to the same thing.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ]
      },
      {
        "id": "DocumentManifest.related.ref",
        "path": "DocumentManifest.related.ref",
        "short": "Related Resource",
        "definition": "Related Resource to this DocumentManifest. For example, Order, ServiceRequest,  Procedure, EligibilityRequest, etc.",
        "comment": "If both identifier and ref elements are present they shall refer to the same thing.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Resource"
            ]
          }
        ]
      }
    ]
  }
}