{
  "resourceType": "StructureDefinition",
  "id": "pr-contract",
  "meta": {
    "source": "https://www.icanbwell.com/fhir_profile_definitions",
    "security": [
      {
        "system": "https://www.icanbwell.com/owner",
        "code": "bwell"
      },
      {
        "system": "https://www.icanbwell.com/access",
        "code": "bwell"
      }
    ]
  },
  "url": "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-contract",
  "version": "1.02",
  "name": "Contract",
  "title": "Profile: Contract",
  "status": "active",
  "experimental": false,
  "date": "2022-06-02",
  "publisher": "b.Well Connected Health",
  "description": "Contract resource",
  "jurisdiction": [
    {
      "coding": [
        {
          "system": "urn:iso:std:iso:3166",
          "code": "US",
          "display": "United States of America"
        }
      ],
      "text": "United States of America"
    }
  ],
  "fhirVersion": "4.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "Contract",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Contract",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Contract",
        "path": "Contract"
      },
      {
        "id": "Contract.id",
        "path": "Contract.id"
      },
      {
        "id": "Contract.meta",
        "path": "Contract.meta",
        "label": "meta",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Meta"
          }
        ]
      },
      {
        "id": "Contract.meta.source",
        "path": "Contract.meta.source",
        "sliceName": "meta-source",
        "label": "meta",
        "short": "uri of the data source",
        "definition": "Typically the data owner's URL followed by a source/file description",
        "requirements": "mandatory for all resources in bWell's FHIR Server",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "example": [
          {
            "label": "example of meta.source",
            "valueUri": "https://www.icanbwell.com/provider-directory"
          }
        ]
      },
      {
        "id": "Contract.meta.security",
        "path": "Contract.meta.security",
        "sliceName": "meta-security",
        "label": "meta",
        "short": "security tags representing the data's owner, vendor, and accessibility",
        "definition": "data owner: \n \n data vendor: \n \n data access: ",
        "requirements": "/owner & /access are mandatory for all resources in bWell's FHIR Server",
        "min": 1,
        "max": "*",
        "type": [
          {
            "code": "Coding"
          }
        ],
        "example": [
          {
            "label": "example of data owner security tag",
            "valueCoding": {
              "system": "https://www.icanbwell.com/owner",
              "code": "bwell"
            }
          },
          {
            "label": "example of data access security tag",
            "valueCoding": {
              "system": "https://www.icanbwell.com/access",
              "code": "bwell"
            }
          },
          {
            "label": "example of data vendor security tag",
            "valueCoding": {
              "system": "https://www.icanbwell.com/vendor",
              "code": "bwell"
            }
          }
        ]
      },
      {
        "id": "Contract.subject",
        "path": "Contract.subject",
        "label": "subject",
        "short": "The patient who signed the contract",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-patient"
            ]
          }
        ]
      },
      {
        "id": "Contract.authority",
        "path": "Contract.authority",
        "label": "authority",
        "short": "Contract is signed through which organization",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-insurance-company",
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-partner-organization",
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-organization"
            ]
          }
        ]
      },
      {
        "id": "Contract.author",
        "path": "Contract.author",
        "label": "author",
        "short": "who owns the contract program.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-patient",
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-healthcare-organization",
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-partner-organization",
              "https://fhir.icanbwell.com/4_0_0/StructureDefinition/pr-insurance-company"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Contract.legal",
        "path": "Contract.legal",
        "mustSupport": true
      },
      {
        "id": "Contract.legal.id",
        "path": "Contract.legal.id",
        "short": "tbd",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "Contract.legal.content[x]",
        "path": "Contract.legal.content[x]",
        "short": "stores the generated pdf contract",
        "min": 1,
        "max": "1",
        "mustSupport": true
      }
    ]
  }
}