<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="d8cef6ef-2b3a-424d-96da-e35e379859e0" />
  <url value="http://health.gov.on.ca/sadie/fhir/StructureDefinition/TermsOfUse" />
  <version value="1.0.0" />
  <name value="TermsOfUse" />
  <title value="TermsOfUse" />
  <status value="active" />
  <date value="2021-06-28T11:36:50.8334855+00:00" />
  <description value="This is a Program Area's Terms of Use policy." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="fhircomposition" />
    <uri value="http://hl7.org/fhir/composition" />
    <name value="FHIR Composition" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="cda" />
    <uri value="http://hl7.org/v3/cda" />
    <name value="CDA (R2)" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <mapping>
    <identity value="xds" />
    <uri value="http://ihe.net/xds" />
    <name value="XDS metadata equivalent" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="DocumentReference" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DocumentReference" />
  <derivation value="constraint" />
  <differential>
    <element id="DocumentReference">
      <path value="DocumentReference" />
      <definition value="#### **_`FOR SADIE USE:  This stores the Terms of Use policy for each Program Area.   This is referenced by the Terms of Use Consent, which stores the fact a user agreed to this Terms of Use.`_**&#xA;&#xA;#### **_`SADIE PARTITION:  This will be in the DEFAULT partition.`_**&#xA;&#xA;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." />
    </element>
    <element id="DocumentReference.masterIdentifier">
      <path value="DocumentReference.masterIdentifier" />
      <definition value="#### **_`FOR SADIE USE:  This is the URI,  the Terms of Use Agreement will reference this URI.  `_**&#xA;&#xA;Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document." />
    </element>
    <element id="DocumentReference.masterIdentifier.use">
      <path value="DocumentReference.masterIdentifier.use" />
      <max value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier.type">
      <path value="DocumentReference.masterIdentifier.type" />
      <max value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier.system">
      <path value="DocumentReference.masterIdentifier.system" />
      <definition value="#### **_`FOR SADIE USE:  If system = urn:ietf:rfc:3986 this means the Value is a URI.  Use system = urn:sadie:internal for SADIE code.`_**&#xA;&#xA;Establishes the namespace for the value - that is, a URL that describes a set values that are unique." />
      <min value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier.value">
      <path value="DocumentReference.masterIdentifier.value" />
      <definition value="#### **_`FOR SADIE USE:  This is the URI.  The Terms Of Use Agreement will reference this URI.  The URI should be prefixed by http://health.gov.on.ca/sadie/fhir/TermsOfUse  and should end with the version  Version1 `_**&#xA;&#xA;The portion of the identifier typically relevant to the user and which is unique within the context of the system." />
      <min value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier.period">
      <path value="DocumentReference.masterIdentifier.period" />
      <max value="0" />
    </element>
    <element id="DocumentReference.masterIdentifier.assigner">
      <path value="DocumentReference.masterIdentifier.assigner" />
      <max value="0" />
    </element>
    <element id="DocumentReference.identifier">
      <path value="DocumentReference.identifier" />
      <definition value="#### **_`FOR SADIE USE:  This is needed to make SmileCDR preloading of data work." />
      <max value="1" />
    </element>
    <element id="DocumentReference.status">
      <path value="DocumentReference.status" />
      <definition value="#### **_`FOR SADIE USE:  There should only be one 'current' Terms of Use per Program Area.  `_**&#xA;&#xA;The status of this document reference." />
    </element>
    <element id="DocumentReference.docStatus">
      <path value="DocumentReference.docStatus" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type">
      <path value="DocumentReference.type" />
      <definition value="#### **_`FOR SADIE USE:  There are 4 types of TOU, this specifies which one.`_**&#xA;&#xA;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." />
      <min value="1" />
    </element>
    <element id="DocumentReference.type.coding">
      <path value="DocumentReference.type.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="DocumentReference.type.coding.system">
      <path value="DocumentReference.type.coding.system" />
      <definition value="#### **_`FOR SADIE USE:  This is the SADIE internal CodeSystem.`_**&#xA;&#xA;Establishes the namespace for the value - that is, a URL that describes a set values that are unique." />
      <min value="1" />
      <fixedString value="https://health.gov.on.ca/sadie/fhir/CodeSystem/FlexForms-Internal-Complete" />
    </element>
    <element id="DocumentReference.type.coding.version">
      <path value="DocumentReference.type.coding.version" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type.coding.code">
      <path value="DocumentReference.type.coding.code" />
      <definition value="#### **_`FOR SADIE USE:  There are 4 types of TOU, this specifies which one.`_**&#xA;&#xA;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)." />
      <min value="1" />
      <binding>
        <strength value="required" />
        <valueSet value="http://health.gov.on.ca/sadie/fhir/ValueSet/FlexForms-DocumentReference-Types" />
      </binding>
    </element>
    <element id="DocumentReference.type.coding.display">
      <path value="DocumentReference.type.coding.display" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type.coding.userSelected">
      <path value="DocumentReference.type.coding.userSelected" />
      <max value="0" />
    </element>
    <element id="DocumentReference.type.text">
      <path value="DocumentReference.type.text" />
      <definition value="#### **_`FOR SADIE USE:  This is the DocumentReference this is,  it will always be TOU.`_**&#xA;&#xA;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." />
      <max value="0" />
      <fixedString value="TOU" />
    </element>
    <element id="DocumentReference.category">
      <path value="DocumentReference.category" />
      <max value="0" />
    </element>
    <element id="DocumentReference.subject">
      <path value="DocumentReference.subject" />
      <max value="0" />
    </element>
    <element id="DocumentReference.date">
      <path value="DocumentReference.date" />
      <definition value="#### **_`FOR SADIE USE:  This is the last updated date time.  `_**&#xA;&#xA;When the document reference was created." />
    </element>
    <element id="DocumentReference.author">
      <path value="DocumentReference.author" />
      <definition value="#### **_`FOR SADIE USE:  This is a reference to the  Program Area.`_**&#xA;&#xA;Identifies who is responsible for adding the information to the document." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://health.gov.on.ca/sadie/fhir/StructureDefinition/ProgramArea" />
      </type>
    </element>
    <element id="DocumentReference.authenticator">
      <path value="DocumentReference.authenticator" />
      <max value="0" />
    </element>
    <element id="DocumentReference.custodian">
      <path value="DocumentReference.custodian" />
      <max value="0" />
    </element>
    <element id="DocumentReference.relatesTo">
      <path value="DocumentReference.relatesTo" />
      <max value="0" />
    </element>
    <element id="DocumentReference.description">
      <path value="DocumentReference.description" />
      <max value="0" />
    </element>
    <element id="DocumentReference.securityLabel">
      <path value="DocumentReference.securityLabel" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content">
      <path value="DocumentReference.content" />
      <definition value="#### **_`FOR SADIE USE:  This is the Terms of Use text.`_**&#xA;&#xA;The document and format referenced. There may be multiple content element repetitions, each with a different format." />
    </element>
    <element id="DocumentReference.content.attachment.contentType">
      <path value="DocumentReference.content.attachment.contentType" />
      <definition value="#### **_`FOR SADIE USE:  This should be text/plain for announcements.`_**&#xA;&#xA;The document and format referenced. There may be multiple content element repetitions, each with a different format." />
      <min value="1" />
    </element>
    <element id="DocumentReference.content.attachment.language">
      <path value="DocumentReference.content.attachment.language" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.data">
      <path value="DocumentReference.content.attachment.data" />
      <definition value="#### **_`FOR SADIE USE:  This is the Terms of Use text.`_**&#xA;&#xA;The actual data of the attachment - a sequence of bytes, base64 encoded." />
      <min value="1" />
    </element>
    <element id="DocumentReference.content.attachment.url">
      <path value="DocumentReference.content.attachment.url" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.size">
      <path value="DocumentReference.content.attachment.size" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.hash">
      <path value="DocumentReference.content.attachment.hash" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.title">
      <path value="DocumentReference.content.attachment.title" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.attachment.creation">
      <path value="DocumentReference.content.attachment.creation" />
      <max value="0" />
    </element>
    <element id="DocumentReference.content.format">
      <path value="DocumentReference.content.format" />
      <max value="0" />
    </element>
    <element id="DocumentReference.context">
      <path value="DocumentReference.context" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>