PackagesCanonicalsLogsProblems
    Packages
    ans.fhir.fr.pdsm@3.1.0
    https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference
{
  "description": "Profil spécifique dérivé du profil IHE MHD v4.0.1 \\\"ComprehensiveDocumentReference\\\" créé pour le volet \\\"Partage de documents de santé en mobilité\\\".",
  "_filename": "StructureDefinition-pdsm-comprehensive-document-reference.json",
  "package_name": "ans.fhir.fr.pdsm",
  "date": "2024-05-29T10:00:38+00:00",
  "derivation": "constraint",
  "publisher": "ANS",
  "fhirVersion": "4.0.1",
  "name": "PDSm_ComprehensiveDocumentReference",
  "mapping": [ {
    "name": "Spécification métier vers le profil PDSm_ComprehensiveDocumentReference",
    "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
  }, {
    "uri": "http://hl7.org/fhir/workflow",
    "name": "Workflow Pattern",
    "identity": "workflow"
  }, {
    "uri": "http://hl7.org/fhir/composition",
    "name": "FHIR Composition",
    "identity": "fhircomposition"
  }, {
    "uri": "http://hl7.org/v3",
    "name": "RIM Mapping",
    "identity": "rim"
  }, {
    "uri": "http://hl7.org/v3/cda",
    "name": "CDA (R2)",
    "identity": "cda"
  }, {
    "uri": "http://hl7.org/fhir/fivews",
    "name": "FiveWs Pattern Mapping",
    "identity": "w5"
  }, {
    "uri": "http://hl7.org/v2",
    "name": "HL7 v2 Mapping",
    "identity": "v2"
  }, {
    "uri": "http://ihe.net/xds",
    "name": "XDS metadata equivalent",
    "identity": "xds"
  }, {
    "uri": "XDS",
    "name": "XDS and MHD Mapping",
    "identity": "DocumentEntry-Mapping"
  } ],
  "abstract": false,
  "type": "DocumentReference",
  "experimental": null,
  "resourceType": "StructureDefinition",
  "title": "PDSm Comprehensive DocumentReference",
  "package_version": "3.1.0",
  "snapshot": {
    "element": [ {
      "constraint": [ {
        "key": "dom-2",
        "human": "If the resource is contained in another resource, it SHALL NOT contain nested Resources",
        "xpath": "not(parent::f:contained and f:contained)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.contained.empty()"
      }, {
        "key": "dom-3",
        "human": "If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource",
        "xpath": "not(exists(for $id in f:contained/*/f:id/@value return $contained[not(parent::*/descendant::f:reference/@value=concat('#', $contained/*/id/@value) or descendant::f:reference[@value='#'])]))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()"
      }, {
        "key": "dom-4",
        "human": "If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated",
        "xpath": "not(exists(f:contained/*/f:meta/f:versionId)) and not(exists(f:contained/*/f:meta/f:lastUpdated))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()"
      }, {
        "key": "dom-5",
        "human": "If a resource is contained in another resource, it SHALL NOT have a security label",
        "xpath": "not(exists(f:contained/*/f:meta/f:security))",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "contained.meta.security.empty()"
      }, {
        "key": "dom-6",
        "human": "A resource should have narrative for robust management",
        "xpath": "exists(f:text/h:div)",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "warning",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice",
          "valueBoolean": true
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bestpractice-explanation",
          "valueMarkdown": "When a resource has no narrative, only systems that fully understand the data can display the resource to a human safely. Including a human readable representation in the resource makes for a much more robust eco-system and cheaper handling of resources by intermediary systems. Some ecosystems restrict distribution of resources to only those systems that do fully understand the resources, and as a consequence implementers may believe that the narrative is superfluous. However experience shows that such eco-systems often open up to new participants over time."
        } ],
        "expression": "text.`div`.exists()"
      }, {
        "key": "iti-mhd-repl",
        "human": "a DocumetReference replacements needs to relate to a superseded DocumentReference",
        "source": "https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Minimal.DocumentReference",
        "severity": "error",
        "expression": "relatesTo.empty() or (relatesTo.code='replaces' implies relatesTo.target.exists())"
      } ],
      "path": "DocumentReference",
      "min": 0,
      "definition": "A reference to a document of any kind for any purpose. Provides metadata about the document so that the document can be discovered and managed. The scope of a document is any seralized object with a mime-type, so includes formal patient centric documents (CDA), cliical notes, scanned paper, and non-patient specific documents like policy text.",
      "isModifier": false,
      "short": "A reference to a document",
      "mapping": [ {
        "map": "Entity. Role, or Act",
        "identity": "rim"
      }, {
        "map": "Event",
        "identity": "workflow"
      }, {
        "map": "when describing a Composition",
        "identity": "fhircomposition"
      }, {
        "map": "Document[classCode=\"DOC\" and moodCode=\"EVN\"]",
        "identity": "rim"
      }, {
        "map": "when describing a CDA",
        "identity": "cda"
      }, {
        "map": "XDS DocumentEntry",
        "comment": "Used in the context of the IHE MHD ImplementationGuide",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "Fiche",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "max": "*",
      "id": "DocumentReference",
      "comment": "Usually, this is used for documents other than those defined by FHIR.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference"
      },
      "isSummary": false
    }, {
      "path": "DocumentReference.id",
      "min": 0,
      "definition": "The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.",
      "isModifier": false,
      "short": "Logical id of this artifact",
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "id"
        } ]
      } ],
      "max": "1",
      "id": "DocumentReference.id",
      "comment": "The only time that a resource does not have an id is when it is being submitted to the server using a create operation.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.id"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta",
      "min": 0,
      "definition": "The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.",
      "isModifier": false,
      "short": "Metadata about the resource",
      "type": [ {
        "code": "Meta"
      } ],
      "max": "1",
      "id": "DocumentReference.meta",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.meta"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.meta.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.meta.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.meta.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.meta.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.versionId",
      "min": 0,
      "definition": "The version specific identifier, as it appears in the version portion of the URL. This value changes when the resource is created, updated, or deleted.",
      "isModifier": false,
      "short": "Numéro de version de la fiche d’un document attribué par le système cible. La valeur de la métadonnée version est égale à 1 pour la première version de la fiche. Cet élément est requis lorsque le flux envoyé correspond à une mise à jour des données d’une fiche.",
      "mapping": [ {
        "map": "version : [0..1] Numerique",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "id"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.meta.versionId",
      "comment": "The server assigns this value, and ignores what the client specifies, except in the case that the server is imposing version integrity on updates/deletes.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Meta.versionId"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.lastUpdated",
      "min": 0,
      "definition": "When the resource last changed - e.g. when the version changed.",
      "isModifier": false,
      "short": "When the resource version last changed",
      "type": [ {
        "code": "instant"
      } ],
      "max": "1",
      "id": "DocumentReference.meta.lastUpdated",
      "comment": "This value is always populated except when the resource is first being created. The server / resource manager sets this value; what a client provides is irrelevant. This is equivalent to the HTTP Last-Modified and SHOULD have the same value on a [read](http://hl7.org/fhir/R4/http.html#read) interaction.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Meta.lastUpdated"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.source",
      "min": 0,
      "definition": "A uri that identifies the source system of the resource. This provides a minimal amount of [Provenance](http://hl7.org/fhir/R4/provenance.html#) information that can be used to track or differentiate the source of information in the resource. The source may identify another FHIR server, document, message, database, etc.",
      "isModifier": false,
      "short": "Identifies where the resource comes from",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "DocumentReference.meta.source",
      "comment": "In the provenance resource, this corresponds to Provenance.entity.what[x]. The exact use of the source (and the implied Provenance.entity.role) is left to implementer discretion. Only one nominated source is allowed; for additional provenance details, a full Provenance resource should be used. \n\nThis element can be used to indicate where the current master source of a resource that has a canonical URL if the resource is no longer hosted at the canonical URL.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Meta.source"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.profile",
      "min": 0,
      "definition": "A list of profiles (references to [StructureDefinition](http://hl7.org/fhir/R4/structuredefinition.html#) resources) that this resource claims to conform to. The URL is a reference to [StructureDefinition.url](http://hl7.org/fhir/R4/structuredefinition-definitions.html#StructureDefinition.url).",
      "isModifier": false,
      "short": "Profiles this resource claims to conform to",
      "mapping": [ {
        "map": "DocumentEntry.limitedMetadata",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "canonical",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/StructureDefinition" ]
      } ],
      "max": "*",
      "id": "DocumentReference.meta.profile",
      "comment": "It is up to the server and/or other infrastructure of policy to determine whether/how these claims are verified and/or updated over time.  The list of profile URLs is a set.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.profile"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.security",
      "min": 0,
      "definition": "Security labels applied to this resource. These tags connect specific resources to the overall security policy and infrastructure.",
      "isModifier": false,
      "short": "Security Labels applied to this resource",
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/security-labels",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "SecurityLabels"
        } ],
        "description": "Security Labels from the Healthcare Privacy and Security Classification System."
      },
      "max": "*",
      "id": "DocumentReference.meta.security",
      "comment": "The security labels can be updated without changing the stated version of the resource. The list of security labels is a set. Uniqueness is based the system/code, and version and display are ignored.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.security"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.meta.tag",
      "min": 0,
      "definition": "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.",
      "isModifier": false,
      "short": "Tags applied to this resource",
      "type": [ {
        "code": "Coding"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://hl7.org/fhir/ValueSet/common-tags",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Tags"
        } ],
        "description": "Codes that represent various types of tags, commonly workflow-related; e.g. \"Needs review by Dr. Jones\"."
      },
      "max": "*",
      "id": "DocumentReference.meta.tag",
      "comment": "The tags can be updated without changing the stated version of the resource. The list of tags is a set. Uniqueness is based the system/code, and version and display are ignored.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Meta.tag"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.implicitRules",
      "min": 0,
      "definition": "A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.",
      "isModifier": true,
      "short": "A set of rules under which this content was created",
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "DocumentReference.implicitRules",
      "comment": "Asserting this rule set restricts the content to be only understood by a limited set of trading partners. This inherently limits the usefulness of the data in the long term. However, the existing health eco-system is highly fractured, and not yet ready to define, collect, and exchange data in a generally computable sense. Wherever possible, implementers and/or specification writers should avoid using this element. Often, when used, the URL is a reference to an implementation guide that defines these special rules as part of it's narrative along with other profiles, value sets, etc.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.implicitRules"
      },
      "isModifierReason": "This element is labeled as a modifier because the implicit rules may provide additional knowledge about the resource that modifies it's meaning or interpretation",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.language",
      "min": 0,
      "definition": "The base language in which the resource is written.",
      "isModifier": false,
      "short": "Language of the resource content",
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "DocumentReference.language",
      "comment": "Language is provided to support indexing and accessibility (typically, services such as text to speech use the language tag). The html language tag in the narrative applies  to the narrative. The language tag on the resource may be used to specify the language of other presentations generated from the data in the resource. Not all the content has to be in the base language. The Resource.language should not be assumed to apply to the narrative automatically. If a language is specified, it should it also be specified on the div element in the html (see rules in HTML5 for information about the relationship between xml:lang and the html lang attribute).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Resource.language"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.text",
      "min": 0,
      "definition": "A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it \"clinically safe\" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.",
      "isModifier": false,
      "short": "Text summary of the resource, for human interpretation",
      "mapping": [ {
        "map": "Act.text?",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Narrative"
      } ],
      "alias": [ "narrative", "html", "xhtml", "display" ],
      "max": "1",
      "id": "DocumentReference.text",
      "comment": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative. In some cases, a resource may only have text with little or no additional discrete data (as long as all minOccurs=1 elements are satisfied).  This may be necessary for data from legacy systems where information is captured as a \"text blob\" or where text is additionally entered raw or narrated and encoded information is added later.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DomainResource.text"
      },
      "isSummary": false
    }, {
      "path": "DocumentReference.contained",
      "min": 1,
      "definition": "These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.",
      "isModifier": false,
      "short": "Ressource contenue. Dans le cadre de ce profil, il est obligatoire qu'il y ait au moins une ressource contenue : la•les ressource•s référencée•s dans les attributs author et authenticator",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Resource"
      } ],
      "mustSupport": true,
      "alias": [ "inline resources", "anonymous resources", "contained resources" ],
      "max": "*",
      "id": "DocumentReference.contained",
      "comment": "This should never be done when the content can be identified properly, as once identification is lost, it is extremely difficult (and context dependent) to restore it again. Contained resources may have profiles and tags In their meta elements, but SHALL NOT have security labels.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.contained"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.extension",
      "min": 0,
      "definition": "An Extension",
      "isModifier": false,
      "short": "Extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "max": "*",
      "id": "DocumentReference.extension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.extension",
      "min": 0,
      "definition": "Extension définie par le volet ANS \"Volet Partage de documents de santé en mobilité\" sur les ressources List et DocumentReference pour distinguer les lots de soumission et les fiches archivés des actives.",
      "short": "Extension définie pour distinguer les fiches archivées des actives.",
      "mapping": [ {
        "map": "statut : [1..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": [ "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-ext-is-archived" ]
      } ],
      "mustSupport": true,
      "sliceName": "isArchived",
      "max": "1",
      "id": "DocumentReference.extension:isArchived",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.modifierExtension",
      "min": 0,
      "definition": "An Extension",
      "isModifier": true,
      "short": "Extension",
      "type": [ {
        "code": "Extension"
      } ],
      "max": "0",
      "id": "DocumentReference.modifierExtension",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DomainResource.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the resource that contains them",
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.masterIdentifier",
      "requirements": "The structure and format of this Id shall be consistent with the specification corresponding to the formatCode attribute. (e.g. for a DICOM standard document a 64-character numeric UID, for an HL7 CDA format a serialization of the CDA Document Id extension and root in the form \"oid^extension\", where OID is a 64 digits max, and the Id is a 16 UTF-8 char max. If the OID is coded without the extension then the '^' character shall not be included.).",
      "min": 1,
      "definition": "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.",
      "isModifier": false,
      "short": "Représente l’identifiant unique global affecté au document par son créateur. Il est utilisable comme référence externe dans d’autres documents.",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)",
        "identity": "v2"
      }, {
        "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]",
        "identity": "rim"
      }, {
        "map": "Identifier",
        "identity": "servd"
      }, {
        "map": "DocumentEntry.uniqueId",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "idUnique : [0..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Identifier",
        "profile": [ "https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.UniqueIdIdentifier" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.masterIdentifier",
      "condition": [ "ele-1" ],
      "comment": "CDA Document Id extension and root.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.masterIdentifier"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.identifier",
      "min": 0,
      "definition": "Other identifiers associated with the document, including version independent identifiers.",
      "isModifier": false,
      "short": "Other identifiers for the document",
      "mapping": [ {
        "map": "Event.identifier",
        "identity": "workflow"
      }, {
        "map": "FiveWs.identifier",
        "identity": "w5"
      }, {
        "map": "TXA-16?",
        "identity": "v2"
      }, {
        "map": ".id / .setId",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.entryUUID",
        "identity": "xds"
      }, {
        "map": "DocumentEntry.entryUUID",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "idFiche : [0..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "use",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "DocumentReference.identifier",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.identifier"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.identifier",
      "min": 0,
      "definition": "An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers.",
      "isModifier": false,
      "short": "An identifier intended for computation",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)",
        "identity": "v2"
      }, {
        "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]",
        "identity": "rim"
      }, {
        "map": "Identifier",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Identifier",
        "profile": [ "https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.EntryUUID.Identifier" ]
      } ],
      "sliceName": "entryUUID",
      "max": "*",
      "id": "DocumentReference.identifier:entryUUID",
      "condition": [ "ele-1" ],
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.identifier"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.status",
      "min": 1,
      "definition": "The status of this document reference.",
      "isModifier": true,
      "short": "current | superseded | entered-in-error",
      "mapping": [ {
        "map": "Event.status",
        "identity": "workflow"
      }, {
        "map": "FiveWs.status",
        "identity": "w5"
      }, {
        "map": "TXA-19",
        "identity": "v2"
      }, {
        "map": "interim: .completionCode=\"IN\" & ./statusCode[isNormalDatatype()]=\"active\";  final: .completionCode=\"AU\" &&  ./statusCode[isNormalDatatype()]=\"complete\" and not(./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct()]);  amended: .completionCode=\"AU\" &&  ./statusCode[isNormalDatatype()]=\"complete\" and ./inboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()]/source[subsumesCode(\"ActClass#CACT\") and moodCode=\"EVN\" and domainMember(\"ReviseDocument\", code) and isNormalAct() and statusCode=\"completed\"];  withdrawn : .completionCode=NI &&  ./statusCode[isNormalDatatype()]=\"obsolete\"",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.availabilityStatus",
        "identity": "xds"
      }, {
        "map": "DocumentEntry.availabilityStatus",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "statut : [1..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "required",
        "valueSet": "https://profiles.ihe.net/ITI/MHD/ValueSet/DocumentReferenceStats"
      },
      "max": "1",
      "id": "DocumentReference.status",
      "comment": "This is the status of the DocumentReference object, which might be independent from the docStatus element.\n\nThis element is labeled as a modifier because the status contains the codes that mark the document or reference as not currently valid.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "DocumentReference.status"
      },
      "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
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.docStatus",
      "min": 0,
      "definition": "The status of the underlying document.",
      "isModifier": false,
      "short": "preliminary | final | amended | entered-in-error",
      "mapping": [ {
        "map": "FiveWs.status",
        "identity": "w5"
      }, {
        "map": "Composition.status",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-17",
        "identity": "v2"
      }, {
        "map": ".statusCode",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/composition-status|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "ReferredDocumentStatus"
        } ],
        "description": "Status of the underlying document."
      },
      "max": "0",
      "id": "DocumentReference.docStatus",
      "comment": "The document that is pointed to might be in various lifecycle states.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.docStatus"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-type",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n\r\n TRE_A05-TypeDocComplementaireCISIS, OID : 1.2.250.1.213.1.1.4.12\n\r\n TRE_A04-TypeDocument-LOINC, OID : 2.16.840.1.113883.6.1\n\r\n TRE_A12-NomenclatureASTM, OID : ASTM\n\r\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J66-TypeCode-DMP).\r\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J07-XdsTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.type",
      "min": 1,
      "definition": "Specifies the particular kind of document referenced  (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.",
      "isModifier": false,
      "short": "Représente le type du document.",
      "mapping": [ {
        "map": "Event.code",
        "identity": "workflow"
      }, {
        "map": "FiveWs.class",
        "identity": "w5"
      }, {
        "map": "Composition.type",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-2",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.type",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/code/@code \n\nThe typeCode should be mapped from the ClinicalDocument/code element to a set of document type codes configured in the affinity domain. One suggested coding system to use for typeCode is LOINC, in which case the mapping step can be omitted.",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.typeCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "typeDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J07-XdsTypeCode-CISIS/FHIR/JDV-J07-XdsTypeCode-CISIS"
      },
      "max": "1",
      "id": "DocumentReference.type",
      "comment": "Key metadata element describing the document that describes he exact type of document. Helps humans to assess whether the document is of interest when viewing a list of documents.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-category",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A03-ClasseDocument-CISIS, OID : 1.2.250.1.213.1.1.4.1\n-\tTRE_A10-NomenclatureURN, OID : URN\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J57-ClassCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J06-XdsClassCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.category",
      "min": 1,
      "definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.",
      "isModifier": false,
      "short": "Représente la classe du document (compte rendu, imagerie médicale, traitement, certificat,...).",
      "mapping": [ {
        "map": "FiveWs.class",
        "identity": "w5"
      }, {
        "map": "Composition.class",
        "identity": "fhircomposition"
      }, {
        "map": ".outboundRelationship[typeCode=\"COMP].target[classCode=\"LIST\", moodCode=\"EVN\"].code",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.class",
        "identity": "xds"
      }, {
        "map": "Derived from a mapping of /ClinicalDocument/code/@code to an Affinity Domain specified coded value to use and coding system. Affinity Domains are encouraged to use the appropriate value for Type of Service, based on the LOINC Type of Service (see Page 53 of the LOINC User's Manual). Must be consistent with /ClinicalDocument/code/@code",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.classCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "classeDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J06-XdsClassCode-CISIS/FHIR/JDV-J06-XdsClassCode-CISIS"
      },
      "alias": [ "claxs" ],
      "max": "1",
      "id": "DocumentReference.category",
      "comment": "Key metadata element describing the the category or classification of the document. This is a broader perspective that groups similar documents based on how they would be used. This is a primary key used in searching.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.category"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.subject",
      "min": 1,
      "definition": "Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a 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).",
      "isModifier": false,
      "short": "Référence vers le patient concerné par le document. Cette même ressource est référencée depuis context.sourcePatientInfo.",
      "mapping": [ {
        "map": "Event.subject",
        "identity": "workflow"
      }, {
        "map": "FiveWs.subject[x]",
        "identity": "w5"
      }, {
        "map": "Composition.subject",
        "identity": "fhircomposition"
      }, {
        "map": "PID-3 (No standard way to define a Practitioner or Group subject in HL7 v2 MDM message)",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.patientId",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/recordTarget/",
        "identity": "cda"
      }, {
        "map": "FiveWs.subject",
        "identity": "w5"
      }, {
        "map": "DocumentEntry.patientId",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "idPatient : [0..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.subject",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.subject"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.date",
      "min": 0,
      "definition": "When the document reference was created.",
      "isModifier": false,
      "short": "Représente la date de création de la ressource DocumentReference dans FHIR",
      "mapping": [ {
        "map": "Event.occurrence[x]",
        "identity": "workflow"
      }, {
        "map": "FiveWs.recorded",
        "identity": "w5"
      }, {
        "map": "Composition.date",
        "identity": "fhircomposition"
      }, {
        "map": ".availabilityTime[type=\"TS\"]",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "instant"
      } ],
      "mustSupport": true,
      "alias": [ "indexed" ],
      "max": "1",
      "id": "DocumentReference.date",
      "comment": "Referencing/indexing time is used for tracking, organizing versions and searching.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.date"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.author",
      "min": 1,
      "definition": "Identifies who is responsible for adding the information to the document.",
      "isModifier": false,
      "short": "Personnes physiques ou morales et/ou les dispositifs auteurs d'un document.",
      "mapping": [ {
        "map": "Event.performer.actor",
        "identity": "workflow"
      }, {
        "map": "Composition.author",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-9 (No standard way to indicate a Device in HL7 v2 MDM message)",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=\"AUT\"].role[classCode=\"ASSIGNED\"]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.author",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/author",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.author",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "auteur : [1..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-practitionerrole", "http://hl7.org/fhir/StructureDefinition/Device", "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "DocumentReference.author",
      "comment": "Not necessarily who did the actual data entry (i.e. typist) or who was the source (informant).",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.author"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.authenticator",
      "min": 1,
      "definition": "Which person or organization authenticates that this document is valid.",
      "isModifier": false,
      "short": "Cet attribut représente l’acteur validant le document et prenant la responsabilité du contenu médical de celui-ci. Il peut s’agir de l’auteur du document si celui-ci est une personne et s’il endosse la responsabilité du contenu médical de ses documents. Si l’auteur est un dispositif, cet attribut doit représenter la personne responsable de l’action effectuée par le dispositif. Pour les documents d’expression personnelle du patient, cet attribut fait référence au patient.",
      "mapping": [ {
        "map": "Event.performer.actor",
        "identity": "workflow"
      }, {
        "map": "FiveWs.witness",
        "identity": "w5"
      }, {
        "map": "Composition.attester",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-10",
        "identity": "v2"
      }, {
        "map": ".participation[typeCode=\"AUTHEN\"].role[classCode=\"ASSIGNED\"]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.legalAuthenticator",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/legalAuthenticator",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.legalAuthenticator",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "authentificateur : [1..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-practitionerrole", "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-organization" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.authenticator",
      "comment": "Represents a participant within the author institution who has legally authenticated or attested the document. Legal authentication implies that a document has been signed manually or electronically by the legal Authenticator.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.authenticator"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.custodian",
      "min": 0,
      "definition": "Identifies the organization or group who is responsible for ongoing maintenance of and access to the document.",
      "isModifier": false,
      "short": "Organization which maintains the document",
      "mapping": [ {
        "map": "Event.performer.actor",
        "identity": "workflow"
      }, {
        "map": "Composition.custodian",
        "identity": "fhircomposition"
      }, {
        "map": ".participation[typeCode=\"RCV\"].role[classCode=\"CUST\"].scoper[classCode=\"ORG\" and determinerCode=\"INST\"]",
        "identity": "rim"
      }, {
        "map": "not mapped",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "1",
      "id": "DocumentReference.custodian",
      "comment": "Identifies the logical organization (software system, vendor, or department) to go to find the current version, where to report issues, etc. This is different from the physical location (URL, disk drive, or server) of the document, which is the technical location of the document, which host may be delegated to the management of some other organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.custodian"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-cdr-rempl",
        "human": "Elément requis lorsque le flux envoyé correspond au remplacement d'un document",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      }, {
        "key": "constr-bind-relatesTo",
        "human": "Cardinalité contrainte à [1..1] lorsque le flux envoyé correspond au remplacement d’un document.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.relatesTo",
      "min": 0,
      "definition": "Cardinalité contrainte à [1..1] lorsque le flux envoyé correspond au remplacement d’un document.",
      "isModifier": false,
      "short": "Relation avec d'autres fiches",
      "mapping": [ {
        "map": "Composition.relatesTo",
        "identity": "fhircomposition"
      }, {
        "map": ".outboundRelationship",
        "identity": "rim"
      }, {
        "map": "DocumentEntry Associations",
        "identity": "xds"
      }, {
        "map": "DocumentEntry Associations",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "DocumentReference.relatesTo",
      "comment": "This element is labeled as a modifier because documents that append to other documents are incomplete on their own.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.relatesTo"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.relatesTo.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.relatesTo.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.relatesTo.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.relatesTo.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.relatesTo.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "DocumentReference.relatesTo.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.relatesTo.code",
      "min": 1,
      "definition": "The type of relationship that this document has with anther document.",
      "isModifier": false,
      "short": "Représente le type d'association entre deux fiches.",
      "mapping": [ {
        "map": "Composition.relatesTo.code",
        "identity": "fhircomposition"
      }, {
        "map": ".outboundRelationship.typeCode",
        "identity": "rim"
      }, {
        "map": "DocumentEntry Associations type",
        "identity": "xds"
      }, {
        "map": "DocumentEntry Associations.type",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "association : [0..*] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/document-relationship-type|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DocumentRelationshipType"
        } ],
        "description": "The type of relationship between documents."
      },
      "max": "1",
      "id": "DocumentReference.relatesTo.code",
      "comment": "If this document appends another document, then the document cannot be fully understood without also accessing the referenced document.",
      "base": {
        "max": "1",
        "min": 1,
        "path": "DocumentReference.relatesTo.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-relatesToTarget",
        "human": "Référence contrainte au profil PDSm_ComprehensiveDocumentReference",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.relatesTo.target",
      "min": 1,
      "definition": "The target document of this relationship.",
      "isModifier": false,
      "short": "Représente l'identifiant d'une association entre deux fiches.",
      "mapping": [ {
        "map": "Composition.relatesTo.target",
        "identity": "fhircomposition"
      }, {
        "map": ".target[classCode=\"DOC\", moodCode=\"EVN\"].id",
        "identity": "rim"
      }, {
        "map": "DocumentEntry Associations reference",
        "identity": "xds"
      }, {
        "map": "DocumentEntry Associations.reference",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "idFicheAssociation : [0..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/DocumentReference" ]
      } ],
      "max": "1",
      "id": "DocumentReference.relatesTo.target",
      "base": {
        "max": "1",
        "min": 1,
        "path": "DocumentReference.relatesTo.target"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.description",
      "requirements": "Helps humans to assess whether the document is of interest.",
      "min": 0,
      "definition": "Human-readable description of the source document.",
      "isModifier": false,
      "short": "Commentaire associé au document.",
      "mapping": [ {
        "map": "TXA-25",
        "identity": "v2"
      }, {
        "map": ".outboundRelationship[typeCode=\"SUBJ\"].target.text",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.comments",
        "identity": "xds"
      }, {
        "map": "DocumentEntry.comments",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "commentaire : [0..1] Texte",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.description",
      "comment": "What the document is about,  a terse summary of the document.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.description"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-securityLabel",
        "human": "Les codes pour cet élément doivent provenir du ValueSet spécifié par le standard. Lorsqu’aucun code ne correspond au concept recherché, un code provenant de la terminologie de référence TRE_A07-StatusVisibiliteDocument, OID : 1.2.250.1.213.1.1.4.13 peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.securityLabel",
      "requirements": "Use of the Health Care Privacy/Security Classification (HCS) system of security-tag use is recommended.",
      "min": 1,
      "definition": "A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to.",
      "isModifier": false,
      "short": "Contient les informations définissant le niveau de confidentialité d'un document.",
      "mapping": [ {
        "map": "Composition.confidentiality, Composition.meta.security",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-18",
        "identity": "v2"
      }, {
        "map": ".confidentialityCode",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.confidentialityCode",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/confidentialityCode/@code",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.confidentialityCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "niveauConfidentialite : [0..*] code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/security-labels",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "SecurityLabels"
        } ],
        "description": "Security Labels from the Healthcare Privacy and Security Classification System."
      },
      "max": "*",
      "id": "DocumentReference.securityLabel",
      "comment": "The confidentiality codes can carry multiple vocabulary items. HL7 has developed an understanding of security and privacy tags that might be desirable in a Document Sharing environment, called HL7 Healthcare Privacy and Security Classification System (HCS). The following specification is recommended but not mandated, as the vocabulary bindings are an administrative domain responsibility. The use of this method is up to the policy domain such as the XDS Affinity Domain or other Trust Domain where all parties including sender and recipients are trusted to appropriately tag and enforce.   \n\nIn the HL7 Healthcare Privacy and Security Classification (HCS) there are code systems specific to Confidentiality, Sensitivity, Integrity, and Handling Caveats. Some values would come from a local vocabulary as they are related to workflow roles and special projects.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.securityLabel"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content",
      "min": 1,
      "definition": "The document and format referenced.",
      "isModifier": false,
      "short": "Document référencé.",
      "mapping": [ {
        "map": "Bundle(Composition+*)",
        "identity": "fhircomposition"
      }, {
        "map": "document.text",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.content",
      "base": {
        "max": "*",
        "min": 1,
        "path": "DocumentReference.content"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.content.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.content.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.content.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.content.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.content.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "DocumentReference.content.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment",
      "min": 1,
      "definition": "The document or URL of the document along with critical metadata to prove content has integrity.",
      "isModifier": false,
      "short": "Where to access the document",
      "mapping": [ {
        "map": "Composition.language, \nComposition.title, \nComposition.date",
        "identity": "fhircomposition"
      }, {
        "map": "TXA-3 for mime type",
        "identity": "v2"
      }, {
        "map": "document.text",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.mimeType, DocumentEntry.languageCode, DocumentEntry.URI, DocumentEntry.size, DocumentEntry.hash, DocumentEntry.title, DocumentEntry.creationTime",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/languageCode, ClinicalDocument/title, ClinicalDocument/date",
        "identity": "cda"
      } ],
      "type": [ {
        "code": "Attachment"
      } ],
      "max": "1",
      "id": "DocumentReference.content.attachment",
      "base": {
        "max": "1",
        "min": 1,
        "path": "DocumentReference.content.attachment"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.content.attachment.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.content.attachment.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.content.attachment.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.content.attachment.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.contentType",
      "requirements": "Processors of the data need to be able to know how to interpret the data.",
      "min": 1,
      "definition": "Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.",
      "isModifier": false,
      "short": "Mime type of the content, with charset etc.",
      "mapping": [ {
        "map": "ED.2+ED.3/RP.2+RP.3. Note conversion may be needed if old style values are being used",
        "identity": "v2"
      }, {
        "map": "./mediaType, ./charset",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.mimeType",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/mimetypes|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "MimeType"
        } ],
        "description": "The mime type of an attachment. Any valid mime type is allowed."
      },
      "max": "1",
      "id": "DocumentReference.content.attachment.contentType",
      "example": [ {
        "label": "General",
        "valueCode": "text/plain; charset=UTF-8, image/png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.contentType"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.language",
      "requirements": "Users need to be able to choose between the languages in a set of attachments.",
      "min": 1,
      "definition": "The human language of the content. The value can be any valid value according to BCP 47.",
      "isModifier": false,
      "short": "Pour tous les documents produits par les systèmes initiateurs français, le code est \"fr-FR'.",
      "mapping": [ {
        "map": "./language",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.languageCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "langueDocument : [1..*] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "http://hl7.org/fhir/ValueSet/languages",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-maxValueSet",
          "valueCanonical": "http://hl7.org/fhir/ValueSet/all-languages"
        }, {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "Language"
        } ],
        "description": "A human language."
      },
      "max": "1",
      "id": "DocumentReference.content.attachment.language",
      "example": [ {
        "label": "General",
        "valueCode": "en-AU"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.language"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.data",
      "requirements": "The data needs to able to be transmitted inline.",
      "min": 0,
      "definition": "The actual data of the attachment - a sequence of bytes, base64 encoded.",
      "isModifier": false,
      "short": "Data inline, base64ed",
      "mapping": [ {
        "map": "ED.5",
        "identity": "v2"
      }, {
        "map": "./data",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "max": "0",
      "id": "DocumentReference.content.attachment.data",
      "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.data"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-attachmenturl",
        "human": "Dans le cas de l’ajout de document, l’url fait référence à la ressource Binary (« Binary/[id] »).\nDans le cas de la recherche, il s’agit de l’URL permettant d’accéder au document",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.content.attachment.url",
      "requirements": "The data needs to be transmitted by reference.",
      "min": 1,
      "definition": "A location where the data can be accessed.",
      "isModifier": false,
      "short": "Représente la référence vers une ressource Binary où se trouvent les données du document référencé",
      "mapping": [ {
        "map": "RP.1+RP.2 - if they refer to a URL (see v2.6)",
        "identity": "v2"
      }, {
        "map": "./reference/literal",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.repositoryUniqueId or DocuemntEntry.URI",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "Document : [0..1]",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "url"
      } ],
      "max": "1",
      "id": "DocumentReference.content.attachment.url",
      "comment": "If both data and url are provided, the url SHALL point to the same content as the data contains. Urls may be relative references or may reference transient locations such as a wrapping envelope using cid: though this has ramifications for using signatures. Relative URLs are interpreted relative to the service url, like a resource reference, rather than relative to the resource itself. If a URL is provided, it SHALL resolve to actual data.",
      "example": [ {
        "label": "General",
        "valueUrl": "http://www.acme.com/logo-small.png"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.url"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.size",
      "requirements": "Representing the size allows applications to determine whether they should fetch the content automatically in advance, or refuse to fetch it at all.",
      "min": 1,
      "definition": "The number of bytes of data that make up this attachment (before base64 encoding, if that is done).",
      "isModifier": false,
      "short": "Représente la taille du document.",
      "mapping": [ {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.size",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "unsignedInt"
      } ],
      "max": "1",
      "id": "DocumentReference.content.attachment.size",
      "comment": "The number of bytes is redundant if the data is provided as a base64binary, but is useful if the data is provided as a url reference.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.size"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.hash",
      "requirements": "Included so that applications can verify that the contents of a location have not changed due to technical failures (e.g., storage rot, transport glitch, incorrect version).",
      "min": 1,
      "definition": "The calculated hash of the data using SHA-1. Represented using base64.",
      "isModifier": false,
      "short": "Représente le résultat de hachage du document (SHA 1).",
      "mapping": [ {
        "map": ".integrityCheck[parent::ED/integrityCheckAlgorithm=\"SHA-1\"]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.hash",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "base64Binary"
      } ],
      "max": "1",
      "id": "DocumentReference.content.attachment.hash",
      "comment": "The hash is calculated on the data prior to base64 encoding, if the data is based64 encoded. The hash is not intended to support digital signatures. Where protection against malicious threats a digital signature should be considered, see [Provenance.signature](http://hl7.org/fhir/R4/provenance-definitions.html#Provenance.signature) for mechanism to protect a resource with a digital signature.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.hash"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.title",
      "requirements": "Applications need a label to display to a human user in place of the actual data if the data cannot be rendered or perceived by the viewer.",
      "min": 1,
      "definition": "A label or set of text to display in place of the data.",
      "isModifier": false,
      "short": "Label to display in place of the data",
      "mapping": [ {
        "map": "./title/data",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.title",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "titreDocument : [0..1] Texte",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "DocumentReference.content.attachment.title",
      "example": [ {
        "label": "General",
        "valueString": "Official Corporate Logo"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.title"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.content.attachment.creation",
      "requirements": "This is often tracked as an integrity issue for use of the attachment.",
      "min": 1,
      "definition": "The date that the attachment was first created.",
      "isModifier": false,
      "short": "Représente la date et l’heure de création du document",
      "mapping": [ {
        "map": "N/A (needs data type R3 proposal)",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.creationTime",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "dateCreationDocument : [1..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.content.attachment.creation",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Attachment.creation"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-format",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n- TRE_A06-FormatCodeComplementaire, OID : 1.2.250.1.213.1.1.4.2.282\n- TRE_A11-IheFormatCode, OID : 1.3.6.1.4.1.19376.1.2.3\n- TRE_A09-DICOMuidRegistry, OID : 1.2.840.10008.2.6.1\n- TRE_A10-NomenclatureURN, OID : URN\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J60-FormatCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J10-XdsFormatCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.content.format",
      "min": 1,
      "definition": "An identifier of the document encoding, structure, and template that the document conforms to beyond the base format indicated in the mimeType.",
      "isModifier": false,
      "short": "Format technique détaillé du document.",
      "mapping": [ {
        "map": "Composition.meta.profile",
        "identity": "fhircomposition"
      }, {
        "map": "document.text",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.formatCode",
        "identity": "xds"
      }, {
        "map": "derived from the IHE Profile or Implementation Guide templateID",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.formatCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "formatDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J10-XdsFormatCode-CISIS/FHIR/JDV-J10-XdsFormatCode-CISIS"
      },
      "max": "1",
      "id": "DocumentReference.content.format",
      "comment": "Note that while IHE mostly issues URNs for format types, not all documents can be identified by a URI.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.content.format"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context",
      "min": 1,
      "definition": "The clinical context in which the document was prepared.",
      "isModifier": false,
      "short": "Clinical context of document",
      "mapping": [ {
        "map": "outboundRelationship[typeCode=\"SUBJ\"].target[classCode<'ACT']",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "BackboneElement"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context",
      "comment": "These values are primarily added to help with searching for interesting/relevant documents.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.context"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.context.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.modifierExtension",
      "requirements": "Modifier extensions allow for extensions that *cannot* be safely ignored to be clearly distinguished from the vast majority of extensions which can be safely ignored.  This promotes interoperability by eliminating the need for implementers to prohibit the presence of extensions. For further information, see the [definition of modifier extensions](http://hl7.org/fhir/R4/extensibility.html#modifierExtension).",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.\n\nModifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).",
      "isModifier": true,
      "short": "Extensions that cannot be ignored even if unrecognized",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content", "modifiers" ],
      "max": "*",
      "id": "DocumentReference.context.modifierExtension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "BackboneElement.modifierExtension"
      },
      "isModifierReason": "Modifier extensions are expected to modify the meaning or interpretation of the element that contains them",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.encounter",
      "min": 0,
      "definition": "Describes the clinical encounter or type of care that the document content is associated with.",
      "isModifier": false,
      "short": "Context of the document  content",
      "mapping": [ {
        "map": "Event.context",
        "identity": "workflow"
      }, {
        "map": "FiveWs.context",
        "identity": "w5"
      }, {
        "map": "Composition.encounter",
        "identity": "fhircomposition"
      }, {
        "map": "unique(highest(./outboundRelationship[typeCode=\"SUBJ\" and isNormalActRelationship()], priorityNumber)/target[moodCode=\"EVN\" and classCode=(\"ENC\", \"PCPR\") and isNormalAct])",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.referenceIdList with CXi encoding for urn:ihe:iti:xds:2015:encounterId",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Encounter", "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare" ]
      } ],
      "max": "*",
      "id": "DocumentReference.context.encounter",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.context.encounter"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-context-event",
        "human": "Nomenclatures utilisées : 1) CCAM pour les actes médicaux (OID=\"1.2.250.1.213.2.5\"); 2) CIM-10 pour les diagnostics de pathologie (OID=\"2.16.840.1.113883.6.3\"), 3) TRE_A00-ProducteurDocNonPS pour les documents d'expression personnelle du patient, 4) autre",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.context.event",
      "min": 0,
      "definition": "This list of codes represents the main clinical acts, such as a colonoscopy or an appendectomy, being documented. In some cases, the event is inherent in the type Code, such as a \"History and Physical Report\" in which the procedure being documented is necessarily a \"History and Physical\" act.",
      "isModifier": false,
      "short": "Représente les actes et les pathologies en rapport avec le document.",
      "mapping": [ {
        "map": "Composition.event.code",
        "identity": "fhircomposition"
      }, {
        "map": ".code",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.eventCodeList",
        "identity": "xds"
      }, {
        "map": "DocumentEntry.eventCodeList",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "actePathologie : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "example",
        "valueSet": "http://terminology.hl7.org/ValueSet/v3-ActCode",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "DocumentEventType"
        } ],
        "description": "This list of codes represents the main clinical acts being documented."
      },
      "max": "*",
      "id": "DocumentReference.context.event",
      "comment": "An event can further specialize the act inherent in the type, such as  where it is simply \"Procedure Report\" and the procedure was a \"colonoscopy\". If one or more event codes are included, they shall not conflict with the values inherent in the class or type elements as such a conflict would create an ambiguous situation.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.context.event"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.period",
      "min": 1,
      "definition": "The time period over which the service that is described by the document was provided.",
      "isModifier": false,
      "short": "Time of service that is being documented",
      "mapping": [ {
        "map": "Composition.event.period",
        "identity": "fhircomposition"
      }, {
        "map": ".effectiveTime",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.serviceStartTime, DocumentEntry.serviceStopTime",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/low/\n@value --> ClinicalDocument/documentationOf/\nserviceEvent/effectiveTime/high/\n@value",
        "identity": "cda"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.period",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.context.period"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.context.period.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.period.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.period.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.period.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.period.start",
      "min": 1,
      "definition": "The start of the period. The boundary is inclusive.",
      "isModifier": false,
      "short": "Starting time with inclusive boundary",
      "mapping": [ {
        "map": "DR.1",
        "identity": "v2"
      }, {
        "map": "./low",
        "identity": "rim"
      }, {
        "map": "DocumetEntry.serviceStartTime",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "dateDebutActe : [0..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "max": "1",
      "id": "DocumentReference.context.period.start",
      "condition": [ "per-1" ],
      "comment": "If the low element is missing, the meaning is that the low boundary is not known.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Period.start"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.period.end",
      "min": 0,
      "definition": "The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.",
      "isModifier": false,
      "short": "End time with inclusive boundary, if not ongoing",
      "mapping": [ {
        "map": "DR.2",
        "identity": "v2"
      }, {
        "map": "./high",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.serviceStopTime",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "dateFinActe : [0..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "dateTime"
      } ],
      "meaningWhenMissing": "If the end of the period is missing, it means that the period is ongoing",
      "max": "1",
      "id": "DocumentReference.context.period.end",
      "condition": [ "per-1" ],
      "comment": "The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Period.end"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-ProducteurDoc",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A00-ProducteurDocNonPS, OID : 1.2.250.1.213.1.1.4.6 (lorsque l’auteur du document est un patient ou un équipement sous sa responsabilité)\n-\tTRE_R02-SecteurActivite, OID : 1.2.250.1.71.4.2.4 (lorsque l’auteur du document est un professionnel ou un équipement sous sa responsabilité)\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J61-HealthcareFacilityTypeCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J02-XdsHealthcareFacilityTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.context.facilityType",
      "min": 1,
      "definition": "The kind of facility where the patient was seen.",
      "isModifier": false,
      "short": "Secteur d'activité lié à la prise en charge de la personne, en lien avec le document produit.",
      "mapping": [ {
        "map": "usually from a mapping to a local ValueSet",
        "identity": "fhircomposition"
      }, {
        "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.healthcareFacilityTypeCode",
        "identity": "xds"
      }, {
        "map": "usually a mapping to a local ValueSet. Must be consistent with /clinicalDocument/code",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.healthcareFacilityTypeCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "secteurActivite : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J02-XdsHealthcareFacilityTypeCode-CISIS/FHIR/JDV-J02-XdsHealthcareFacilityTypeCode-CISIS"
      },
      "max": "1",
      "id": "DocumentReference.context.facilityType",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.context.facilityType"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "constr-bind-ProducteurDoc",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A00-ProducteurDocNonPS, OID : 1.2.250.1.213.1.1.4.6 (lorsque l’auteur du document est un patient ou un équipement sous sa responsabilité)\n-\tTRE_R02-SecteurActivite, OID : 1.2.250.1.71.4.2.4 (lorsque l’auteur du document est un professionnel ou un équipement sous sa responsabilité)\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J61-HealthcareFacilityTypeCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J02-XdsHealthcareFacilityTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "path": "DocumentReference.context.practiceSetting",
      "requirements": "This is an important piece of metadata that providers often rely upon to quickly sort and/or filter out to find specific content.",
      "min": 1,
      "definition": "This property may convey specifics about the practice setting where the content was created, often reflecting the clinical specialty.",
      "isModifier": false,
      "short": "Cadre d’exercice de l’acte qui a engendré la création du document.",
      "mapping": [ {
        "map": "usually from a mapping to a local ValueSet",
        "identity": "fhircomposition"
      }, {
        "map": ".participation[typeCode=\"LOC\"].role[classCode=\"DSDLOC\"].code",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.practiceSettingCode",
        "identity": "xds"
      }, {
        "map": "usually from a mapping to a local ValueSet",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.practiceSettingCode",
        "identity": "DocumentEntry-Mapping"
      }, {
        "map": "cadreExercice : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "mustSupport": true,
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J04-XdsPracticeSettingCode-CISIS/FHIR/JDV-J04-XdsPracticeSettingCode-CISIS"
      },
      "max": "1",
      "id": "DocumentReference.context.practiceSetting",
      "comment": "This element should be based on a coarse classification system for the class of specialty practice. Recommend the use of the classification system for Practice Setting, such as that described by the Subject Matter Domain in LOINC.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.context.practiceSetting"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo",
      "min": 1,
      "definition": "The Patient Information as known when the document was published. May be a reference to a version specific, or contained.",
      "isModifier": false,
      "short": "Référence vers la ressource Patient titulaire du dossier.",
      "mapping": [ {
        "map": "Composition.subject",
        "identity": "fhircomposition"
      }, {
        "map": ".participation[typeCode=\"SBJ\"].role[typeCode=\"PAT\"]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.sourcePatientInfo, DocumentEntry.sourcePatientId",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/recordTarget/",
        "identity": "cda"
      } ],
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo",
      "base": {
        "max": "1",
        "min": 0,
        "path": "DocumentReference.context.sourcePatientInfo"
      },
      "isSummary": false
    }, {
      "path": "DocumentReference.context.sourcePatientInfo.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "isModifier": false,
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), \"value\")])",
        "source": "http://hl7.org/fhir/StructureDefinition/Extension",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "isModifier": false,
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.sourcePatientInfo.extension",
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo.reference",
      "min": 0,
      "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
      "isModifier": false,
      "short": "Literal reference, Relative, internal or absolute URL",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.sourcePatientInfo",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo.reference",
      "condition": [ "ref-1" ],
      "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.reference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo.type",
      "min": 0,
      "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
      "isModifier": false,
      "short": "Type the reference refers to (e.g. \"Patient\")",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/resource-types",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "FHIRResourceTypeExt"
        } ],
        "description": "Aa resource (or, for logical models, the URI of the logical model)."
      },
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo.type",
      "comment": "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo.identifier",
      "min": 0,
      "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
      "isModifier": false,
      "short": "Logical reference, when literal reference is not known",
      "mapping": [ {
        "map": ".identifier",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.sourcePatientId",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo.identifier",
      "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.identifier"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.sourcePatientInfo.display",
      "min": 0,
      "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
      "isModifier": false,
      "short": "Text alternative for the resource",
      "mapping": [ {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "DocumentReference.context.sourcePatientInfo.display",
      "comment": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related",
      "min": 0,
      "definition": "Related identifiers or resources associated with the DocumentReference.",
      "isModifier": false,
      "short": "Related identifiers or resources",
      "mapping": [ {
        "map": "Composition.event.detail",
        "identity": "fhircomposition"
      }, {
        "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.referenceIdList",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/relatedDocument",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.referenceIdList using CXi encoding for type when possible",
        "identity": "DocumentEntry-Mapping"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Slice based on the type.coding.system pattern",
        "discriminator": [ {
          "path": "type",
          "type": "pattern"
        } ]
      },
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "mustSupport": true,
      "max": "*",
      "id": "DocumentReference.context.related",
      "comment": "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.context.related"
      },
      "isSummary": false
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related",
      "min": 0,
      "definition": "Related identifiers or resources associated with the DocumentReference.",
      "isModifier": false,
      "short": "Données d’un « identifiant de référence » (referenceIdList)",
      "mapping": [ {
        "map": "Composition.event.detail",
        "identity": "fhircomposition"
      }, {
        "map": "./outboundRelationship[typeCode=\"PERT\" and isNormalActRelationship()] / target[isNormalAct]",
        "identity": "rim"
      }, {
        "map": "DocumentEntry.referenceIdList",
        "identity": "xds"
      }, {
        "map": "ClinicalDocument/relatedDocument",
        "identity": "cda"
      }, {
        "map": "DocumentEntry.referenceIdList using CXi encoding for type when possible",
        "identity": "DocumentEntry-Mapping"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Resource" ]
      } ],
      "sliceName": "referenceIdList",
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList",
      "comment": "May be identifiers or resources that caused the DocumentReference or referenced Document to be created.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "DocumentReference.context.related"
      },
      "isSummary": false
    }, {
      "path": "DocumentReference.context.related.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.related.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "normative"
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode": "4.0.0"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.reference",
      "min": 0,
      "definition": "A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.",
      "short": "Literal reference, Relative, internal or absolute URL",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.reference",
      "condition": [ "ele-1", "ref-1" ],
      "comment": "Using absolute URLs provides a stable scalable approach suitable for a cloud/web context, while using relative/logical references provides a flexible approach suitable for use when trading across closed eco-system boundaries.   Absolute URLs do not need to point to a FHIR RESTful server, though this is the preferred approach. If the URL conforms to the structure \"/[type]/[id]\" then it should be assumed that the reference is to a FHIR RESTful server.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.reference"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.type",
      "min": 0,
      "definition": "The expected type of the target of the reference. If both Reference.type and Reference.reference are populated and Reference.reference is a FHIR URL, both SHALL be consistent.\n\nThe type is the Canonical URL of Resource Definition that is the type this reference refers to. References are URLs that are relative to http://hl7.org/fhir/StructureDefinition/ e.g. \"Patient\" is a reference to http://hl7.org/fhir/StructureDefinition/Patient. Absolute URLs are only allowed for logical models (and can only be used in references in logical models, not resources).",
      "short": "Type the reference refers to (e.g. \"Patient\")",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/resource-types",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "FHIRResourceTypeExt"
        } ],
        "description": "Aa resource (or, for logical models, the URI of the logical model)."
      },
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.type",
      "condition": [ "ele-1" ],
      "comment": "This element is used to indicate the type of  the target of the reference. This may be used which ever of the other elements are populated (or not). In some cases, the type of the target may be determined by inspection of the reference (e.g. a RESTful URL) or by resolving the target of the reference; if both the type and a reference is provided, the reference SHALL resolve to a resource of the same type as that specified.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.type"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier",
      "min": 0,
      "definition": "An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.",
      "short": "Logical reference, when literal reference is not known",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX / EI (occasionally, more often EI maps to a resource id or a URL)",
        "identity": "v2"
      }, {
        "map": "II - The Identifier class is a little looser than the v3 type II because it allows URIs as well as registered OIDs or GUIDs.  Also maps to Role[classCode=IDENT]",
        "identity": "rim"
      }, {
        "map": "Identifier",
        "identity": "servd"
      }, {
        "map": ".identifier",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "Identifier"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier",
      "condition": [ "ele-1" ],
      "comment": "When an identifier is provided in place of a reference, any system processing the reference will only be able to resolve the identifier to a reference if it understands the business context in which the identifier is used. Sometimes this is global (e.g. a national identifier) but often it is not. For this reason, none of the useful mechanisms described for working with references (e.g. chaining, includes) are possible, nor should servers be expected to be able resolve the reference. Servers may accept an identifier based reference untouched, resolve it, and/or reject it - see CapabilityStatement.rest.resource.referencePolicy. \n\nWhen both an identifier and a literal reference are provided, the literal reference is preferred. Applications processing the resource are allowed - but not required - to check that the identifier matches the literal reference\n\nApplications converting a logical reference to a literal reference may choose to leave the logical reference present, or remove it.\n\nReference is intended to point to a structure that can potentially be expressed as a FHIR resource, though there is no need for it to exist as an actual FHIR resource instance - except in as much as an application wishes to actual find the target of the reference. The content referred to be the identifier must meet the logical constraints implied by any limitations on what resource types are permitted for the reference.  For example, it would not be legitimate to send the identifier for a drug prescription if the type were Reference(Observation|DiagnosticReport).  One of the use-cases for Reference.identifier is the situation where no FHIR representation exists (where the type is Reference (Any).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.identifier"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.context.related.identifier.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.related.identifier.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "normative"
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode": "4.0.0"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList.identifier.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.use",
      "requirements": "Allows the appropriate identifier for a particular context of use to be selected from among a set of identifiers.",
      "min": 0,
      "definition": "The purpose of this identifier.",
      "isModifier": true,
      "short": "usual | official | temp | secondary | old (If known)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "binding": {
        "strength": "required",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-use|4.0.1",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierUse"
        } ],
        "description": "Identifies the purpose for this identifier, if known ."
      },
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.use",
      "condition": [ "ele-1" ],
      "comment": "Applications can assume that an identifier is permanent unless it explicitly says that it is temporary.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.use"
      },
      "isModifierReason": "This is labeled as \"Is Modifier\" because applications should not mistake a temporary id for a permanent one.",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type",
      "requirements": "Allows users to make use of identifiers when the identifier system is not known.",
      "min": 0,
      "definition": "A coded type for the identifier that can be used to determine which identifier to use for a specific purpose.",
      "short": "Description of identifier",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE",
        "identity": "v2"
      }, {
        "map": "CD",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept rdfs:subClassOf dt:CD",
        "identity": "orim"
      }, {
        "map": "CX.5",
        "identity": "v2"
      }, {
        "map": "Role.code or implied by context",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "CodeableConcept"
      } ],
      "binding": {
        "strength": "extensible",
        "valueSet": "http://hl7.org/fhir/ValueSet/identifier-type",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
          "valueString": "IdentifierType"
        } ],
        "description": "A coded type for an identifier that can be used to determine which identifier to use for a specific purpose."
      },
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type",
      "condition": [ "ele-1" ],
      "comment": "This element deals only with general categories of identifiers.  It SHOULD not be used for codes that correspond 1..1 with the Identifier.system. Some identifiers may fall into multiple categories due to common usage.   Where the system is known, a type is unnecessary because the type is always part of the system definition. However systems often need to handle identifiers where the system is not known. There is not a 1:1 relationship between type and system, since many different systems have the same type.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.type"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.context.related.identifier.type.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.related.identifier.type.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "normative"
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode": "4.0.0"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding",
      "requirements": "Allows for alternative encodings within a code system, and translations to other code systems.",
      "min": 0,
      "definition": "A reference to a code defined by a terminology system.",
      "short": "Code defined by a terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CE/CNE/CWE subset one of the sets of component 1-3 or 4-6",
        "identity": "v2"
      }, {
        "map": "CV",
        "identity": "rim"
      }, {
        "map": "fhir:Coding rdfs:subClassOf dt:CDCoding",
        "identity": "orim"
      }, {
        "map": "C*E.1-8, C*E.10-22",
        "identity": "v2"
      }, {
        "map": "union(., ./translation)",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.coding rdfs:subPropertyOf dt:CD.coding",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "Coding"
      } ],
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding",
      "condition": [ "ele-1" ],
      "comment": "Codes may be defined very casually in enumerations, or code lists, up to very formal definitions such as SNOMED CT - see the HL7 v3 Core Principles for more information.  Ordering of codings is undefined and SHALL NOT be used to infer meaning. Generally, at most only one of the coding values will be labeled as UserSelected = true.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "CodeableConcept.coding"
      },
      "isSummary": true
    }, {
      "path": "DocumentReference.context.related.identifier.type.coding.id",
      "min": 0,
      "definition": "Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.",
      "short": "Unique id for inter-element referencing",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "http://hl7.org/fhirpath/System.String",
        "extension": [ {
          "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fhir-type",
          "valueUrl": "string"
        } ]
      } ],
      "representation": [ "xmlAttr" ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.id",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Element.id"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ext-1",
        "human": "Must have either extensions or value[x], not both",
        "xpath": "exists(f:extension)!=exists(f:*[starts-with(local-name(.), 'value')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DomainResource",
        "severity": "error",
        "expression": "extension.exists() != value.exists()"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.extension",
      "min": 0,
      "definition": "May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance  applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.",
      "short": "Additional content defined by implementations",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "slicing": {
        "rules": "open",
        "description": "Extensions are always sliced by (at least) url",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      },
      "type": [ {
        "code": "Extension"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
        "valueCode": "normative"
      }, {
        "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-normative-version",
        "valueCode": "4.0.0"
      } ],
      "alias": [ "extensions", "user content" ],
      "max": "*",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.extension",
      "condition": [ "ele-1" ],
      "comment": "There can be no stigma associated with the use of extensions by any application, project, or standard - regardless of the institution or jurisdiction that uses or defines the extensions.  The use of extensions is what allows the FHIR specification to retain a core level of simplicity for everyone.",
      "base": {
        "max": "*",
        "min": 0,
        "path": "Element.extension"
      }
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.system",
      "requirements": "Need to be unambiguous about the source of the definition of the symbol.",
      "min": 0,
      "definition": "The identification of the code system that defines the meaning of the symbol in the code.",
      "short": "Identity of the terminology system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.3",
        "identity": "v2"
      }, {
        "map": "./codeSystem",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.system rdfs:subPropertyOf dt:CDCoding.codeSystem",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.system",
      "condition": [ "ele-1" ],
      "comment": "The URI may be an OID (urn:oid:...) or a UUID (urn:uuid:...).  OIDs and UUIDs SHALL be references to the HL7 OID registry. Otherwise, the URI should come from HL7's list of FHIR defined special URIs or it should reference to some definition that establishes the system clearly and unambiguously.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.system"
      },
      "patternUri": "urn:ietf:rfc:3986",
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.version",
      "min": 0,
      "definition": "The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured, and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.",
      "short": "Version of the system - if relevant",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.7",
        "identity": "v2"
      }, {
        "map": "./codeSystemVersion",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.version rdfs:subPropertyOf dt:CDCoding.codeSystemVersion",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.version",
      "condition": [ "ele-1" ],
      "comment": "Where the terminology does not clearly define what string should be used to identify code system versions, the recommendation is to use the date (expressed in FHIR date format) on which that version was officially published as the version date.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.version"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.code",
      "requirements": "Need to refer to a particular code in the system.",
      "min": 0,
      "definition": "A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).",
      "short": "[CXi.5] Identifier Type Code : urn:ihe:iti:xds:2016:studyInstanceUID | urn:ihe:iti:xds:2013:order | urn:ihe:iti:xds:2013:accession",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.1",
        "identity": "v2"
      }, {
        "map": "./code",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.code rdfs:subPropertyOf dt:CDCoding.code",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "code"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.code",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.code"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.display",
      "requirements": "Need to be able to carry a human-readable meaning of the code for readers that do not know  the system.",
      "min": 0,
      "definition": "A representation of the meaning of the code in the system, following the rules of the system.",
      "short": "Representation defined by the system",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.2 - but note this is not well followed",
        "identity": "v2"
      }, {
        "map": "CV.displayName",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.display rdfs:subPropertyOf dt:CDCoding.displayName",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.display",
      "condition": [ "ele-1" ],
      "comment": "Note that FHIR strings SHALL NOT exceed 1MB in size",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.display"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.coding.userSelected",
      "requirements": "This has been identified as a clinical safety criterium - that this exact system/code pair was chosen explicitly, rather than inferred by the system based on some rules or language processing.",
      "min": 0,
      "definition": "Indicates that this coding was chosen by a user directly - e.g. off a pick list of available items (codes or displays).",
      "short": "If this coding was chosen directly by the user",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "Sometimes implied by being first",
        "identity": "v2"
      }, {
        "map": "CD.codingRationale",
        "identity": "rim"
      }, {
        "map": "fhir:Coding.userSelected fhir:mapsTo dt:CDCoding.codingRationale. fhir:Coding.userSelected fhir:hasMap fhir:Coding.userSelected.map. fhir:Coding.userSelected.map a fhir:Map;   fhir:target dt:CDCoding.codingRationale. fhir:Coding.userSelected\\#true a [     fhir:source \"true\";     fhir:target dt:CDCoding.codingRationale\\#O   ]",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "boolean"
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.userSelected",
      "condition": [ "ele-1" ],
      "comment": "Amongst a set of alternatives, a directly chosen code is the most appropriate starting point for new translations. There is some ambiguity about what exactly 'directly chosen' implies, and trading partner agreement may be needed to clarify the use of this element and its consequences more completely.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Coding.userSelected"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.type.text",
      "requirements": "The codes from the terminologies do not always capture the correct meaning with all the nuances of the human using them, or sometimes there is no appropriate code at all. In these cases, the text is used to capture the full meaning of the source.",
      "min": 0,
      "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.",
      "short": "Plain text representation of the concept",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "C*E.9. But note many systems use C*E.2 for this",
        "identity": "v2"
      }, {
        "map": "./originalText[mediaType/code=\"text/plain\"]/data",
        "identity": "rim"
      }, {
        "map": "fhir:CodeableConcept.text rdfs:subPropertyOf dt:CD.originalText",
        "identity": "orim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.text",
      "condition": [ "ele-1" ],
      "comment": "Very often the text is the same as a displayName of one of the codings.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "CodeableConcept.text"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.system",
      "requirements": "There are many sets  of identifiers.  To perform matching of two identifiers, we need to know what set we're dealing with. The system identifies a particular set of unique identifiers.",
      "min": 0,
      "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.",
      "short": "[CXi.4.2] Assigning Authority (ce champs n'est pas présent systématiquement, il ne l'est dans le cas de studyInstanceUID notamment).",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX.4 / EI-2-4",
        "identity": "v2"
      }, {
        "map": "II.root or Role.id.root",
        "identity": "rim"
      }, {
        "map": "./IdentifierType",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "uri"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.system",
      "condition": [ "ele-1" ],
      "comment": "Identifier.system is always case sensitive.",
      "example": [ {
        "label": "General",
        "valueUri": "http://www.acme.com/identifiers/patient"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.system"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.identifier.value",
      "min": 1,
      "definition": "The portion of the identifier typically relevant to the user and which is unique within the context of the system.",
      "short": "[CXi.1] Accession number",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "CX.1 / EI.1",
        "identity": "v2"
      }, {
        "map": "II.extension or II.root if system indicates OID or GUID (Or Role.id.extension or root)",
        "identity": "rim"
      }, {
        "map": "./Value",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "mustSupport": true,
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.value",
      "condition": [ "ele-1" ],
      "comment": "If the value is a full URI, then the system SHALL be urn:ietf:rfc:3986.  The value's primary purpose is computational mapping.  As a result, it may be normalized for comparison purposes (e.g. removing non-significant whitespace, dashes, etc.)  A value formatted for human display can be conveyed using the [Rendered Value extension](http://hl7.org/fhir/R4/extension-rendered-value.html). Identifier.value is to be treated as case sensitive unless knowledge of the Identifier.system allows the processer to be confident that non-case-sensitive processing is safe.",
      "example": [ {
        "label": "General",
        "valueString": "123456"
      } ],
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.value"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "per-1",
        "human": "If present, start SHALL have a lower value than end",
        "xpath": "not(exists(f:start/@value)) or not(exists(f:end/@value)) or (xs:dateTime(f:start/@value) <= xs:dateTime(f:end/@value))",
        "source": "http://hl7.org/fhir/StructureDefinition/Questionnaire",
        "severity": "error",
        "expression": "start.hasValue().not() or end.hasValue().not() or (start <= end)"
      } ],
      "path": "DocumentReference.context.related.identifier.period",
      "min": 0,
      "definition": "Time period during which identifier is/was valid for use.",
      "short": "Time period when id is/was valid for use",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "DR",
        "identity": "v2"
      }, {
        "map": "IVL[lowClosed=\"true\" and highClosed=\"true\"] or URG[lowClosed=\"true\" and highClosed=\"true\"]",
        "identity": "rim"
      }, {
        "map": "CX.7 + CX.8",
        "identity": "v2"
      }, {
        "map": "Role.effectiveTime or implied by context",
        "identity": "rim"
      }, {
        "map": "./StartDate and ./EndDate",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Period"
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.period",
      "condition": [ "ele-1" ],
      "comment": "A Period specifies a range of time; the context of use will specify whether the entire range applies (e.g. \"the patient was an inpatient of the hospital for this time range\") or one value from the range applies (e.g. \"give to the patient between these two times\").\n\nPeriod is not used for a duration (a measure of elapsed time). See [Duration](http://hl7.org/fhir/R4/datatypes.html#Duration).",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.period"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      }, {
        "key": "ref-1",
        "human": "SHALL have a contained resource if a local reference is provided",
        "xpath": "not(starts-with(f:reference/@value, '#')) or exists(ancestor::*[self::f:entry or self::f:parameter]/f:resource/f:*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')]|/*/f:contained/f:*[f:id/@value=substring-after(current()/f:reference/@value, '#')])",
        "source": "http://hl7.org/fhir/StructureDefinition/DiagnosticReport",
        "severity": "error",
        "expression": "reference.startsWith('#').not() or (reference.substring(1).trace('url') in %rootResource.contained.id.trace('ids'))"
      } ],
      "path": "DocumentReference.context.related.identifier.assigner",
      "min": 0,
      "definition": "Organization that issued/manages the identifier.",
      "short": "Organization that issued id (may be just text)",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "The target of a resource reference is a RIM entry point (Act, Role, or Entity)",
        "identity": "rim"
      }, {
        "map": "CX.4 / (CX.4,CX.9,CX.10)",
        "identity": "v2"
      }, {
        "map": "II.assigningAuthorityName but note that this is an improper use by the definition of the field.  Also Role.scoper",
        "identity": "rim"
      }, {
        "map": "./IdentifierIssuingAuthority",
        "identity": "servd"
      } ],
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "http://hl7.org/fhir/StructureDefinition/Organization" ]
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.identifier.assigner",
      "condition": [ "ele-1" ],
      "comment": "The Identifier.assigner may omit the .reference element and only contain a .display element reflecting the name or other textual information about the assigning organization.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Identifier.assigner"
      },
      "isSummary": true
    }, {
      "constraint": [ {
        "key": "ele-1",
        "human": "All FHIR elements must have a @value or children",
        "xpath": "@value|f:*|h:div",
        "source": "http://hl7.org/fhir/StructureDefinition/Element",
        "severity": "error",
        "expression": "hasValue() or (children().count() > id.count())"
      } ],
      "path": "DocumentReference.context.related.display",
      "min": 0,
      "definition": "Plain text narrative that identifies the resource in addition to the resource reference.",
      "short": "Text alternative for the resource",
      "mapping": [ {
        "map": "n/a",
        "identity": "rim"
      }, {
        "map": "N/A",
        "identity": "rim"
      } ],
      "type": [ {
        "code": "string"
      } ],
      "extension": [ {
        "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
        "valueBoolean": true
      } ],
      "max": "1",
      "id": "DocumentReference.context.related:referenceIdList.display",
      "condition": [ "ele-1" ],
      "comment": "This is generally not the same as the Resource.text of the referenced resource.  The purpose is to identify what's being referenced, not to fully describe it.",
      "base": {
        "max": "1",
        "min": 0,
        "path": "Reference.display"
      },
      "isSummary": true
    } ]
  },
  "status": "active",
  "id": "5b54a123-1dae-4cd9-a027-932436169554",
  "kind": "resource",
  "url": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
  "version": "3.1.0",
  "differential": {
    "element": [ {
      "id": "DocumentReference",
      "path": "DocumentReference",
      "mapping": [ {
        "map": "Fiche",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.meta.versionId",
      "path": "DocumentReference.meta.versionId",
      "short": "Numéro de version de la fiche d’un document attribué par le système cible. La valeur de la métadonnée version est égale à 1 pour la première version de la fiche. Cet élément est requis lorsque le flux envoyé correspond à une mise à jour des données d’une fiche.",
      "mapping": [ {
        "map": "version : [0..1] Numerique",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.contained",
      "min": 1,
      "path": "DocumentReference.contained",
      "short": "Ressource contenue. Dans le cadre de ce profil, il est obligatoire qu'il y ait au moins une ressource contenue : la•les ressource•s référencée•s dans les attributs author et authenticator",
      "mustSupport": true
    }, {
      "id": "DocumentReference.extension",
      "path": "DocumentReference.extension",
      "slicing": {
        "rules": "open",
        "discriminator": [ {
          "path": "url",
          "type": "value"
        } ]
      }
    }, {
      "path": "DocumentReference.extension",
      "min": 0,
      "short": "Extension définie pour distinguer les fiches archivées des actives.",
      "mapping": [ {
        "map": "statut : [1..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "type": [ {
        "code": "Extension",
        "profile": [ "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-ext-is-archived" ]
      } ],
      "mustSupport": true,
      "sliceName": "isArchived",
      "max": "1",
      "id": "DocumentReference.extension:isArchived"
    }, {
      "id": "DocumentReference.masterIdentifier",
      "path": "DocumentReference.masterIdentifier",
      "short": "Représente l’identifiant unique global affecté au document par son créateur. Il est utilisable comme référence externe dans d’autres documents.",
      "mapping": [ {
        "map": "idUnique : [0..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.identifier",
      "path": "DocumentReference.identifier",
      "mapping": [ {
        "map": "idFiche : [0..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.status",
      "path": "DocumentReference.status",
      "mapping": [ {
        "map": "statut : [1..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.type",
      "path": "DocumentReference.type",
      "short": "Représente le type du document.",
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J07-XdsTypeCode-CISIS/FHIR/JDV-J07-XdsTypeCode-CISIS"
      },
      "mapping": [ {
        "map": "typeDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-type",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n\r\n TRE_A05-TypeDocComplementaireCISIS, OID : 1.2.250.1.213.1.1.4.12\n\r\n TRE_A04-TypeDocument-LOINC, OID : 2.16.840.1.113883.6.1\n\r\n TRE_A12-NomenclatureASTM, OID : ASTM\n\r\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J66-TypeCode-DMP).\r\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J07-XdsTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.category",
      "path": "DocumentReference.category",
      "short": "Représente la classe du document (compte rendu, imagerie médicale, traitement, certificat,...).",
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J06-XdsClassCode-CISIS/FHIR/JDV-J06-XdsClassCode-CISIS"
      },
      "mapping": [ {
        "map": "classeDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-category",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A03-ClasseDocument-CISIS, OID : 1.2.250.1.213.1.1.4.1\n-\tTRE_A10-NomenclatureURN, OID : URN\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J57-ClassCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J06-XdsClassCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.subject",
      "path": "DocumentReference.subject",
      "type": [ {
        "code": "Reference",
        "targetProfile": [ "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "short": "Référence vers le patient concerné par le document. Cette même ressource est référencée depuis context.sourcePatientInfo.",
      "mapping": [ {
        "map": "idPatient : [0..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.date",
      "path": "DocumentReference.date",
      "short": "Représente la date de création de la ressource DocumentReference dans FHIR"
    }, {
      "id": "DocumentReference.author",
      "min": 1,
      "path": "DocumentReference.author",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-practitionerrole", "http://hl7.org/fhir/StructureDefinition/Device", "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "short": "Personnes physiques ou morales et/ou les dispositifs auteurs d'un document.",
      "mapping": [ {
        "map": "auteur : [1..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.authenticator",
      "min": 1,
      "path": "DocumentReference.authenticator",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-practitionerrole", "https://interop.esante.gouv.fr/ig/fhir/annuaire/StructureDefinition/as-organization" ]
      } ],
      "short": "Cet attribut représente l’acteur validant le document et prenant la responsabilité du contenu médical de celui-ci. Il peut s’agir de l’auteur du document si celui-ci est une personne et s’il endosse la responsabilité du contenu médical de ses documents. Si l’auteur est un dispositif, cet attribut doit représenter la personne responsable de l’action effectuée par le dispositif. Pour les documents d’expression personnelle du patient, cet attribut fait référence au patient.",
      "mapping": [ {
        "map": "authentificateur : [1..1] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.relatesTo",
      "path": "DocumentReference.relatesTo",
      "short": "Relation avec d'autres fiches",
      "constraint": [ {
        "key": "constr-cdr-rempl",
        "human": "Elément requis lorsque le flux envoyé correspond au remplacement d'un document",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      }, {
        "key": "constr-bind-relatesTo",
        "human": "Cardinalité contrainte à [1..1] lorsque le flux envoyé correspond au remplacement d’un document.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ],
      "definition": "Cardinalité contrainte à [1..1] lorsque le flux envoyé correspond au remplacement d’un document."
    }, {
      "id": "DocumentReference.relatesTo.code",
      "path": "DocumentReference.relatesTo.code",
      "short": "Représente le type d'association entre deux fiches.",
      "mapping": [ {
        "map": "association : [0..*] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.relatesTo.target",
      "path": "DocumentReference.relatesTo.target",
      "short": "Représente l'identifiant d'une association entre deux fiches.",
      "mapping": [ {
        "map": "idFicheAssociation : [0..*] Identifiant",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-relatesToTarget",
        "human": "Référence contrainte au profil PDSm_ComprehensiveDocumentReference",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.description",
      "path": "DocumentReference.description",
      "short": "Commentaire associé au document.",
      "mapping": [ {
        "map": "commentaire : [0..1] Texte",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "mustSupport": true
    }, {
      "id": "DocumentReference.securityLabel",
      "path": "DocumentReference.securityLabel",
      "short": "Contient les informations définissant le niveau de confidentialité d'un document.",
      "mapping": [ {
        "map": "niveauConfidentialite : [0..*] code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-securityLabel",
        "human": "Les codes pour cet élément doivent provenir du ValueSet spécifié par le standard. Lorsqu’aucun code ne correspond au concept recherché, un code provenant de la terminologie de référence TRE_A07-StatusVisibiliteDocument, OID : 1.2.250.1.213.1.1.4.13 peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.content",
      "path": "DocumentReference.content",
      "short": "Document référencé.",
      "mustSupport": true
    }, {
      "id": "DocumentReference.content.attachment.language",
      "path": "DocumentReference.content.attachment.language",
      "short": "Pour tous les documents produits par les systèmes initiateurs français, le code est \"fr-FR'.",
      "mapping": [ {
        "map": "langueDocument : [1..*] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.content.attachment.url",
      "path": "DocumentReference.content.attachment.url",
      "short": "Représente la référence vers une ressource Binary où se trouvent les données du document référencé",
      "mapping": [ {
        "map": "Document : [0..1]",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-attachmenturl",
        "human": "Dans le cas de l’ajout de document, l’url fait référence à la ressource Binary (« Binary/[id] »).\nDans le cas de la recherche, il s’agit de l’URL permettant d’accéder au document",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.content.attachment.size",
      "min": 1,
      "path": "DocumentReference.content.attachment.size",
      "short": "Représente la taille du document."
    }, {
      "id": "DocumentReference.content.attachment.hash",
      "min": 1,
      "path": "DocumentReference.content.attachment.hash",
      "short": "Représente le résultat de hachage du document (SHA 1)."
    }, {
      "id": "DocumentReference.content.attachment.title",
      "min": 1,
      "path": "DocumentReference.content.attachment.title",
      "mapping": [ {
        "map": "titreDocument : [0..1] Texte",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.content.attachment.creation",
      "path": "DocumentReference.content.attachment.creation",
      "short": "Représente la date et l’heure de création du document",
      "mapping": [ {
        "map": "dateCreationDocument : [1..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.content.format",
      "path": "DocumentReference.content.format",
      "short": "Format technique détaillé du document.",
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J10-XdsFormatCode-CISIS/FHIR/JDV-J10-XdsFormatCode-CISIS"
      },
      "mapping": [ {
        "map": "formatDocument : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-format",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n- TRE_A06-FormatCodeComplementaire, OID : 1.2.250.1.213.1.1.4.2.282\n- TRE_A11-IheFormatCode, OID : 1.3.6.1.4.1.19376.1.2.3\n- TRE_A09-DICOMuidRegistry, OID : 1.2.840.10008.2.6.1\n- TRE_A10-NomenclatureURN, OID : URN\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J60-FormatCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J10-XdsFormatCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.context",
      "path": "DocumentReference.context",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.event",
      "path": "DocumentReference.context.event",
      "short": "Représente les actes et les pathologies en rapport avec le document.",
      "mapping": [ {
        "map": "actePathologie : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-context-event",
        "human": "Nomenclatures utilisées : 1) CCAM pour les actes médicaux (OID=\"1.2.250.1.213.2.5\"); 2) CIM-10 pour les diagnostics de pathologie (OID=\"2.16.840.1.113883.6.3\"), 3) TRE_A00-ProducteurDocNonPS pour les documents d'expression personnelle du patient, 4) autre",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.context.period",
      "min": 1,
      "path": "DocumentReference.context.period"
    }, {
      "id": "DocumentReference.context.period.start",
      "min": 1,
      "path": "DocumentReference.context.period.start",
      "mapping": [ {
        "map": "dateDebutActe : [0..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.context.period.end",
      "path": "DocumentReference.context.period.end",
      "mapping": [ {
        "map": "dateFinActe : [0..1] DateHeure",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ]
    }, {
      "id": "DocumentReference.context.facilityType",
      "path": "DocumentReference.context.facilityType",
      "short": "Secteur d'activité lié à la prise en charge de la personne, en lien avec le document produit.",
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J02-XdsHealthcareFacilityTypeCode-CISIS/FHIR/JDV-J02-XdsHealthcareFacilityTypeCode-CISIS"
      },
      "mapping": [ {
        "map": "secteurActivite : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-ProducteurDoc",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A00-ProducteurDocNonPS, OID : 1.2.250.1.213.1.1.4.6 (lorsque l’auteur du document est un patient ou un équipement sous sa responsabilité)\n-\tTRE_R02-SecteurActivite, OID : 1.2.250.1.71.4.2.4 (lorsque l’auteur du document est un professionnel ou un équipement sous sa responsabilité)\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J61-HealthcareFacilityTypeCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J02-XdsHealthcareFacilityTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.context.practiceSetting",
      "path": "DocumentReference.context.practiceSetting",
      "short": "Cadre d’exercice de l’acte qui a engendré la création du document.",
      "binding": {
        "strength": "preferred",
        "valueSet": "https://mos.esante.gouv.fr/NOS/JDV_J04-XdsPracticeSettingCode-CISIS/FHIR/JDV-J04-XdsPracticeSettingCode-CISIS"
      },
      "mapping": [ {
        "map": "cadreExercice : [0..1] Code",
        "identity": "specmetier-to-PDSmComprehensiveDocumentReference"
      } ],
      "constraint": [ {
        "key": "constr-bind-ProducteurDoc",
        "human": "Les valeurs possibles pour cet élément doivent provenir d’une des terminologies de référence suivantes :\n-\tTRE_A00-ProducteurDocNonPS, OID : 1.2.250.1.213.1.1.4.6 (lorsque l’auteur du document est un patient ou un équipement sous sa responsabilité)\n-\tTRE_R02-SecteurActivite, OID : 1.2.250.1.71.4.2.4 (lorsque l’auteur du document est un professionnel ou un équipement sous sa responsabilité)\nLes valeurs possibles peuvent être restreintes en fonction du jeu de valeurs correspondant mis à disposition par le projet (exemple : JDV_J61-HealthcareFacilityTypeCode-DMP).\nEn l’absence de spécifications complémentaires, le jeu de valeurs JDV_J02-XdsHealthcareFacilityTypeCode-CISIS peut être utilisé.",
        "source": "https://interop.esante.gouv.fr/ig/fhir/pdsm/StructureDefinition/pdsm-comprehensive-document-reference",
        "severity": "error"
      } ]
    }, {
      "id": "DocumentReference.context.sourcePatientInfo",
      "path": "DocumentReference.context.sourcePatientInfo",
      "type": [ {
        "code": "Reference",
        "aggregation": [ "contained" ],
        "targetProfile": [ "https://hl7.fr/ig/fhir/core/StructureDefinition/fr-core-patient" ]
      } ],
      "short": "Référence vers la ressource Patient titulaire du dossier."
    }, {
      "id": "DocumentReference.context.related",
      "path": "DocumentReference.context.related",
      "slicing": {
        "rules": "open",
        "description": "Slice based on the type.coding.system pattern",
        "discriminator": [ {
          "path": "type",
          "type": "pattern"
        } ]
      },
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:referenceIdList",
      "max": "*",
      "min": 0,
      "path": "DocumentReference.context.related",
      "short": "Données d’un « identifiant de référence » (referenceIdList)",
      "sliceName": "referenceIdList"
    }, {
      "id": "DocumentReference.context.related:referenceIdList.identifier",
      "path": "DocumentReference.context.related.identifier",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.system",
      "path": "DocumentReference.context.related.identifier.type.coding.system",
      "patternUri": "urn:ietf:rfc:3986"
    }, {
      "id": "DocumentReference.context.related:referenceIdList.identifier.type.coding.code",
      "path": "DocumentReference.context.related.identifier.type.coding.code",
      "short": "[CXi.5] Identifier Type Code : urn:ihe:iti:xds:2016:studyInstanceUID | urn:ihe:iti:xds:2013:order | urn:ihe:iti:xds:2013:accession",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:referenceIdList.identifier.system",
      "path": "DocumentReference.context.related.identifier.system",
      "short": "[CXi.4.2] Assigning Authority (ce champs n'est pas présent systématiquement, il ne l'est dans le cas de studyInstanceUID notamment).",
      "mustSupport": true
    }, {
      "id": "DocumentReference.context.related:referenceIdList.identifier.value",
      "min": 1,
      "path": "DocumentReference.context.related.identifier.value",
      "short": "[CXi.1] Accession number",
      "mustSupport": true
    } ]
  },
  "contact": [ {
    "name": "ANS",
    "telecom": [ {
      "value": "https://esante.gouv.fr",
      "system": "url"
    } ]
  } ],
  "baseDefinition": "https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.Comprehensive.DocumentReference"
}