{
  "resourceType": "StructureDefinition",
  "id": "DataStandardsWales-Organization",
  "url": "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization",
  "version": "1.3.0",
  "name": "DataStandardsWalesOrganization",
  "title": "Data Standards Wales Organization",
  "status": "active",
  "experimental": false,
  "date": "2026-09-30",
  "publisher": "NHS Wales",
  "contact": [
    {
      "name": "FHIR Standards",
      "telecom": [
        {
          "system": "email",
          "value": "fhir.standards@wales.nhs.uk",
          "use": "work",
          "rank": 1
        }
      ]
    }
  ],
  "copyright": "2026 NHS Wales.",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "servd",
      "uri": "http://www.omg.org/spec/ServD/1.0/",
      "name": "ServD"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "Organization",
  "baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Organization.extension:successorOrganization",
        "path": "Organization.extension",
        "sliceName": "successorOrganization",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.wales/StructureDefinition/Extension-DataStandardsWales-SuccessorOrganization"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Organization.identifier",
        "path": "Organization.identifier",
        "comment": "Identifiers for the organization SHOULD be populated if the data exists"
      },
      {
        "id": "Organization.identifier:odsOrganisationCode",
        "path": "Organization.identifier",
        "sliceName": "odsOrganisationCode",
        "mustSupport": true
      },
      {
        "id": "Organization.identifier:odsSiteCode",
        "path": "Organization.identifier",
        "sliceName": "odsSiteCode",
        "max": "0"
      },
      {
        "id": "Organization.identifier:wrtsOrganizationIdentifier",
        "path": "Organization.identifier",
        "sliceName": "wrtsOrganizationIdentifier",
        "short": "The WRTS identifier for the organisation",
        "definition": "The identifier issued or recognised by the Welsh Reference and Terminology Services (WRTS) as the unique identifier for the organisation within Wales.  The value may have been issued by another standards authority such as the Organisation Data Service and adopted by WRTS as the unique identifier.",
        "max": "1"
      },
      {
        "id": "Organization.identifier:wrtsOrganizationIdentifier.system",
        "path": "Organization.identifier.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/Id/wrts-organization-identifier"
      },
      {
        "id": "Organization.identifier:gpClusterCode",
        "path": "Organization.identifier",
        "sliceName": "gpClusterCode",
        "short": "WITHDRAWN. This slice was withdrawn in release 2.7.0. It SHALL NOT be used. Identifies a Wales GP Cluster organization across multiple systems",
        "definition": "WITHDRAWN. This slice was deprecated in release 2.6.0 and withdrawn in release 2.7.0. It SHALL NOT be used. Use a generic identifier with the namespace for WRTS clusters instead.  Identifier for a Wales GP Cluster organization that is used to identify the organization across multiple disparate systems. It applied to a small number of organization resources that are more accurately named WRTS clusters.",
        "requirements": "This identifier is shown as Must Support, only because it is an inherited property of the identifier element in the base definition.  The flag cannot be cleared because it is, through inheritance, applicable to all slices added by the profile.  Given that this identifier slice is deprecated, it should not be considered as Must Support by implementers.",
        "max": "0"
      },
      {
        "id": "Organization.identifier:gpClusterCode.system",
        "path": "Organization.identifier.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/Id/gpcluster-code"
      },
      {
        "id": "Organization.identifier:gpClusterCode.value",
        "path": "Organization.identifier.value",
        "min": 1
      },
      {
        "id": "Organization.active",
        "path": "Organization.active",
        "comment": "A status of the organization (i.e., whether is still active ) SHOULD be populated if the data exists.\r\n\r\nThis active flag is not intended to be used to mark an organization as temporarily closed or under construction. Instead the Location(s) within the Organization should have the suspended status. If further details of the reason for the suspension are required, then an extension on this element should be used.\n\nThis element is labeled as a modifier because it may be used to mark that the resource was created in error."
      },
      {
        "id": "Organization.type",
        "path": "Organization.type",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "coding.system"
            }
          ],
          "description": "Slices to support a structured organization type, including values from a hierarchical organization type code system, with appropriately filtered value sets.",
          "rules": "open"
        },
        "comment": "A structured organization type comprising sector, domain, classification and subclassification should be provided for known organizations, especially where these form part of the organization hierarchy for domains relevant to the delivery of health and care within Wales.",
        "requirements": "For type-specific retrieval of organization resources in operational use cases and to enhance secondary data analysis.",
        "binding": {
          "strength": "extensible",
          "description": "A set of concepts indicating the organization type, derived from the base CodeSystem, and Genomics specific concepts.  Extended for organizations involved in the delivery of health and care in Wales by a structured organization type hierarchy, represented by dedicated slices and code systems",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-OrganizationTypeExtended"
        }
      },
      {
        "id": "Organization.type:sector",
        "path": "Organization.type",
        "sliceName": "sector",
        "short": "Distinguishes public, private and third sector organizations",
        "definition": "The sector of the economy in which the organization operates, based on its funding and control models: public, private or third sector.",
        "comment": "A structured organization type comprising sector, domain, classification and subclassification should be provided for known organizations, especially where these form part of the organization hierarchy for domains relevant to the delivery of health and care within Wales.",
        "requirements": "For type-specific retrieval of organization resources in operational use cases and to enhance secondary data analysis.",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "A set of concepts indicating the organization sector.",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-OrganizationSector"
        }
      },
      {
        "id": "Organization.type:sector.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:sector.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/CodeSystem/DataStandardsWales-OrganizationSector"
      },
      {
        "id": "Organization.type:sector.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:sector.coding.display",
        "path": "Organization.type.coding.display",
        "min": 1
      },
      {
        "id": "Organization.type:sector.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.type:domain",
        "path": "Organization.type",
        "sliceName": "domain",
        "short": "The domain or industry in which the organization operates",
        "definition": "The domain or industry in which the organization operates. In addition to health this includes for example education, social care and justice.",
        "comment": "A structured organization type comprising sector, domain, classification and subclassification should be provided for known organizations, especially where these form part of the organization hierarchy for domains relevant to the delivery of health and care within Wales.",
        "requirements": "For type-specific retrieval of organization resources in operational use cases and to enhance secondary data analysis.",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "A set of concepts indicating the organization domain.",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-OrganizationDomain"
        }
      },
      {
        "id": "Organization.type:domain.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:domain.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/CodeSystem/DataStandardsWales-OrganizationDomain"
      },
      {
        "id": "Organization.type:domain.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:domain.coding.display",
        "path": "Organization.type.coding.display",
        "min": 1
      },
      {
        "id": "Organization.type:domain.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.type:classification",
        "path": "Organization.type",
        "sliceName": "classification",
        "short": "A high level classification of the organization type",
        "definition": "A high level classification of the organization type within the applicable domain e.g. Primary care within the Health domain.",
        "comment": "A structured organization type comprising sector, domain, classification and subclassification should be provided for known organizations, especially where these form part of the organization hierarchy for domains relevant to the delivery of health and care within Wales.",
        "requirements": "For type-specific retrieval of organization resources in operational use cases and to enhance secondary data analysis.",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "A set of concepts indicating the organization classification.  Within the organization type hierarchy, a set of classification entries is defined for each domain.",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-OrganizationClassification"
        }
      },
      {
        "id": "Organization.type:classification.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:classification.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/CodeSystem/DataStandardsWales-OrganizationClassification"
      },
      {
        "id": "Organization.type:classification.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:classification.coding.display",
        "path": "Organization.type.coding.display",
        "min": 1
      },
      {
        "id": "Organization.type:classification.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.type:subclassification",
        "path": "Organization.type",
        "sliceName": "subclassification",
        "short": "A lower level classification of the organization type",
        "definition": "A lower level classification of the organization type within the applicable domain and classification e.g. Dental practice as a specific type of Primary care organization.",
        "comment": "A structured organization type comprising sector, domain, classification and subclassification should be provided for known organizations, especially where these form part of the organization hierarchy for domains relevant to the delivery of health and care within Wales.",
        "requirements": "For type-specific retrieval of organization resources in operational use cases and to enhance secondary data analysis.",
        "max": "1",
        "mustSupport": true,
        "binding": {
          "strength": "extensible",
          "description": "A set of concepts indicating the organization subclassification.  Within the organization type hierarchy, a set of subclassification entries is defined for each classification within each domain.",
          "valueSet": "https://fhir.nhs.wales/ValueSet/DataStandardsWales-OrganizationSubclassification"
        }
      },
      {
        "id": "Organization.type:subclassification.coding",
        "path": "Organization.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Organization.type:subclassification.coding.system",
        "path": "Organization.type.coding.system",
        "min": 1,
        "fixedUri": "https://fhir.nhs.wales/CodeSystem/DataStandardsWales-OrganizationSubclassification"
      },
      {
        "id": "Organization.type:subclassification.coding.code",
        "path": "Organization.type.coding.code",
        "min": 1
      },
      {
        "id": "Organization.type:subclassification.coding.display",
        "path": "Organization.type.coding.display",
        "min": 1
      },
      {
        "id": "Organization.type:subclassification.text",
        "path": "Organization.type.text",
        "max": "0"
      },
      {
        "id": "Organization.name",
        "path": "Organization.name",
        "definition": "A name associated with the organization (e.g. ODS name).",
        "comment": "Organization name SHALL be populated. If the name of an organization changes, consider putting the old name in the alias column so that it can still be located through searches.",
        "min": 1
      },
      {
        "id": "Organization.name.extension",
        "path": "Organization.name.extension",
        "binding": {
          "strength": "preferred",
          "valueSet": "http://hl7.org/fhir/ValueSet/languages"
        }
      },
      {
        "id": "Organization.name.extension:welshPreferredName",
        "path": "Organization.name.extension",
        "sliceName": "welshPreferredName",
        "short": "The Welsh translation of the organization name.",
        "definition": "A recognised Welsh translation of the English name for the organization.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/translation"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Organization.name.extension:welshPreferredName.extension",
        "path": "Organization.name.extension.extension",
        "min": 2,
        "max": "2"
      },
      {
        "id": "Organization.name.extension:welshPreferredName.extension:lang",
        "path": "Organization.name.extension.extension",
        "sliceName": "lang"
      },
      {
        "id": "Organization.name.extension:welshPreferredName.extension:lang.value[x]",
        "path": "Organization.name.extension.extension.value[x]",
        "fixedCode": "cy"
      },
      {
        "id": "Organization.name.extension:welshPreferredName.extension:content",
        "path": "Organization.name.extension.extension",
        "sliceName": "content"
      },
      {
        "id": "Organization.name.extension:welshPreferredName.extension:content.value[x]",
        "path": "Organization.name.extension.extension.value[x]",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "Organization.alias.extension:aliasType",
        "path": "Organization.alias.extension",
        "sliceName": "aliasType",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.nhs.wales/StructureDefinition/Extension-DataStandardsWales-AliasType"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Organization.telecom.value",
        "path": "Organization.telecom.value",
        "min": 1
      },
      {
        "id": "Organization.address.extension:addressKey",
        "path": "Organization.address.extension",
        "sliceName": "addressKey",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Organization.partOf",
        "path": "Organization.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Organization"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "Organization.partOf.identifier.system",
        "path": "Organization.partOf.identifier.system",
        "min": 1
      },
      {
        "id": "Organization.partOf.identifier.value",
        "path": "Organization.partOf.identifier.value",
        "min": 1
      },
      {
        "id": "Organization.contact.address.extension:addressKey",
        "path": "Organization.contact.address.extension",
        "sliceName": "addressKey",
        "definition": "An extension carrying the address key and type.  This extension should be used to store the Unique Property Reference Number (UPRN) associated with the address (https://location.data.gov.uk).",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-AddressKey"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Organization.endpoint",
        "path": "Organization.endpoint",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.wales/StructureDefinition/DataStandardsWales-Endpoint"
            ]
          }
        ]
      }
    ]
  }
}