{
  "resourceType": "StructureDefinition",
  "url": "https://anagrafe.ssr.toscana.it/fhir/StructureDefinition/CodeSystem",
  "name": "CodeSystem",
  "title": "CodeSystem",
  "status": "active",
  "experimental": false,
  "date": "2021-10-20",
  "description": "Dedalus MPI profile for CodeSystem",
  "fhirVersion": "4.0.1",
  "mapping": [
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/w5",
      "name": "W5 Mapping"
    },
    {
      "identity": "objimpl",
      "uri": "http://hl7.org/fhir/object-implementation",
      "name": "Object Implementation Information"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "CodeSystem",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/CodeSystem",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "CodeSystem.meta",
        "path": "CodeSystem.meta",
        "min": 1
      },
      {
        "id": "CodeSystem.meta.tag",
        "path": "CodeSystem.meta.tag",
        "slicing": {
          "rules": "open"
        }
      },
      {
        "id": "CodeSystem.meta.tag:isFixedMonoVersion",
        "path": "CodeSystem.meta.tag",
        "sliceName": "isFixedMonoVersion",
        "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.\r\n\r\nDistinguishes between mono-versioned CS from fixed mono-versioned CS. That meta tag should NOT be used when using multi-versioned Code system.\r\n\r\nUsed ONLY when a fixed mono-versioned CS is used. Tag missing = (non-fixed) mono-versioned.",
        "requirements": "It is a Fixed mono-versioned code system.",
        "max": "1",
        "meaningWhenMissing": "Its a mono-versioned codes system or is multi-versioned code system."
      },
      {
        "id": "CodeSystem.meta.tag:isFixedMonoVersion.system",
        "path": "CodeSystem.meta.tag.system",
        "min": 1,
        "fixedUri": "https://anagrafe.ssr.toscana.it/tag/isFixedMonoVersion",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.meta.tag:isFixedMonoVersion.code",
        "path": "CodeSystem.meta.tag.code",
        "short": "true - false",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "CodeSystem.extension:hasNonUniqueCodes",
        "path": "CodeSystem.extension",
        "sliceName": "hasNonUniqueCodes",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://anagrafe.ssr.toscana.it/fhir/StructureDefinition/extension-codeSystem-hasNonUniqueConceptCodes"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "CodeSystem.url",
        "path": "CodeSystem.url",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "CodeSystem.version",
        "path": "CodeSystem.version",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "CodeSystem.name",
        "path": "CodeSystem.name",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.title",
        "path": "CodeSystem.title",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.status",
        "path": "CodeSystem.status",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.experimental",
        "path": "CodeSystem.experimental",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.publisher",
        "path": "CodeSystem.publisher",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.description",
        "path": "CodeSystem.description",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.copyright",
        "path": "CodeSystem.copyright",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.valueSet",
        "path": "CodeSystem.valueSet",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.versionNeeded",
        "path": "CodeSystem.versionNeeded",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "CodeSystem.content",
        "path": "CodeSystem.content",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property",
        "path": "CodeSystem.property",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property.extension:valueSetBinding",
        "path": "CodeSystem.property.extension",
        "sliceName": "valueSetBinding",
        "definition": "Allows to specify a valueSet url for binding when property.type = code or coding. \r\nWhen a valueset bindins is specified, binding strenght is expect to be \"required\"",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://anagrafe.ssr.toscana.it/fhir/StructureDefinition/extension-codeSystem-propertyValueSetBinding"
            ]
          }
        ]
      },
      {
        "id": "CodeSystem.property.code",
        "path": "CodeSystem.property.code",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property.type",
        "path": "CodeSystem.property.type",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-status",
        "path": "CodeSystem.property",
        "sliceName": "concept-status",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-status.code",
        "path": "CodeSystem.property.code",
        "fixedCode": "status",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-status.type",
        "path": "CodeSystem.property.type",
        "fixedCode": "code",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-start",
        "path": "CodeSystem.property",
        "sliceName": "concept-period-start",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-start.code",
        "path": "CodeSystem.property.code",
        "fixedCode": "period-start",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-start.type",
        "path": "CodeSystem.property.type",
        "fixedCode": "dateTime",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-end",
        "path": "CodeSystem.property",
        "sliceName": "concept-period-end",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-end.code",
        "path": "CodeSystem.property.code",
        "fixedCode": "period-end",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.property:concept-period-end.type",
        "path": "CodeSystem.property.type",
        "fixedCode": "dateTime",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept",
        "path": "CodeSystem.concept",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.id",
        "path": "CodeSystem.concept.id",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.code",
        "path": "CodeSystem.concept.code",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.display",
        "path": "CodeSystem.concept.display",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.definition",
        "path": "CodeSystem.concept.definition",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.designation",
        "path": "CodeSystem.concept.designation",
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.property",
        "path": "CodeSystem.concept.property",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "CodeSystem.concept.property:concept-lastUpdate",
        "path": "CodeSystem.concept.property",
        "sliceName": "concept-lastUpdate"
      },
      {
        "id": "CodeSystem.concept.property:concept-lastUpdate.code",
        "path": "CodeSystem.concept.property.code",
        "fixedCode": "lastUpdate"
      },
      {
        "id": "CodeSystem.concept.property:concept-lastUpdate.value[x]",
        "path": "CodeSystem.concept.property.value[x]",
        "type": [
          {
            "code": "dateTime"
          }
        ]
      }
    ]
  }
}