{
  "resourceType": "StructureDefinition",
  "meta": {
    "lastUpdated": "2023-02-17T12:18:55.1860004+00:00"
  },
  "url": "https://hl7.pt/fhir/StructureDefinition/PT_LocationMF",
  "version": "1.1",
  "name": "PT_LocationMF",
  "status": "draft",
  "experimental": false,
  "date": "2023-02-17T12:19:08.9570243+00:00",
  "description": "A resource for MasterFile about Locations",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Location",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Location",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Location.meta",
        "path": "Location.meta"
      },
      {
        "id": "Location.meta.id",
        "path": "Location.meta.id",
        "max": "0"
      },
      {
        "id": "Location.meta.versionId",
        "path": "Location.meta.versionId",
        "max": "0"
      },
      {
        "id": "Location.meta.lastUpdated",
        "path": "Location.meta.lastUpdated",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "MFI-4.1"
          }
        ]
      },
      {
        "id": "Location.meta.source",
        "path": "Location.meta.source",
        "max": "0"
      },
      {
        "id": "Location.meta.profile",
        "path": "Location.meta.profile",
        "max": "0"
      },
      {
        "id": "Location.meta.security",
        "path": "Location.meta.security",
        "max": "0"
      },
      {
        "id": "Location.meta.tag",
        "path": "Location.meta.tag",
        "max": "0"
      },
      {
        "id": "Location.implicitRules",
        "path": "Location.implicitRules",
        "max": "0"
      },
      {
        "id": "Location.language",
        "path": "Location.language",
        "max": "0"
      },
      {
        "id": "Location.text",
        "path": "Location.text",
        "max": "0"
      },
      {
        "id": "Location.contained",
        "path": "Location.contained",
        "max": "0"
      },
      {
        "id": "Location.identifier.id",
        "path": "Location.identifier.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.type.id",
        "path": "Location.identifier.type.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.type.coding.id",
        "path": "Location.identifier.type.coding.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.type.coding.version",
        "path": "Location.identifier.type.coding.version",
        "max": "0"
      },
      {
        "id": "Location.identifier.type.coding.userSelected",
        "path": "Location.identifier.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Location.identifier.type.text",
        "path": "Location.identifier.type.text",
        "max": "0"
      },
      {
        "id": "Location.identifier.system",
        "path": "Location.identifier.system",
        "max": "0"
      },
      {
        "id": "Location.identifier.value",
        "path": "Location.identifier.value",
        "mapping": [
          {
            "identity": "HL7v2.x-1",
            "map": "MFI-2.1; MFE-2; MFE-4.1"
          },
          {
            "identity": "HL7v2.x-2",
            "map": "LOC / LDP / LCC / LCH-1.1, 1.2, 1.3, 1.4, 1.7, 1.8, 1.10"
          }
        ]
      },
      {
        "id": "Location.identifier.period.id",
        "path": "Location.identifier.period.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.period.start",
        "path": "Location.identifier.period.start",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LDP-7"
          }
        ]
      },
      {
        "id": "Location.identifier.period.end",
        "path": "Location.identifier.period.end",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "MFE-3 (if MFE-1 = MDC or MDL); LDP-8"
          }
        ]
      },
      {
        "id": "Location.identifier.assigner.id",
        "path": "Location.identifier.assigner.id",
        "max": "0"
      },
      {
        "id": "Location.identifier.assigner.reference",
        "path": "Location.identifier.assigner.reference",
        "max": "0"
      },
      {
        "id": "Location.identifier.assigner.type",
        "path": "Location.identifier.assigner.type",
        "max": "0"
      },
      {
        "id": "Location.identifier.assigner.identifier",
        "path": "Location.identifier.assigner.identifier",
        "max": "0"
      },
      {
        "id": "Location.identifier.assigner.display",
        "path": "Location.identifier.assigner.display",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "Organization/LOC-1.11; LDP-1.11; LCC-1.11; LCH-1.11"
          }
        ]
      },
      {
        "id": "Location.status",
        "path": "Location.status",
        "comment": "*The mapping for this field is being updated.",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Based on MFE-1"
          }
        ]
      },
      {
        "id": "Location.operationalStatus.version",
        "path": "Location.operationalStatus.version",
        "max": "0"
      },
      {
        "id": "Location.operationalStatus.userSelected",
        "path": "Location.operationalStatus.userSelected",
        "max": "0"
      },
      {
        "id": "Location.name",
        "path": "Location.name",
        "comment": "*The mapping for this field is being updated."
      },
      {
        "id": "Location.alias",
        "path": "Location.alias",
        "max": "0"
      },
      {
        "id": "Location.description",
        "path": "Location.description",
        "comment": "*The mapping for this field is being updated.",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-2 or LOC-1.9; LDP-1.9; LCC-1.9; LCH-1.9"
          }
        ]
      },
      {
        "id": "Location.mode",
        "path": "Location.mode",
        "max": "0"
      },
      {
        "id": "Location.type",
        "path": "Location.type",
        "comment": "*The mapping for this field is being updated.",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-3; LDP-4"
          }
        ]
      },
      {
        "id": "Location.type.id",
        "path": "Location.type.id",
        "max": "0"
      },
      {
        "id": "Location.type.coding.version",
        "path": "Location.type.coding.version",
        "max": "0"
      },
      {
        "id": "Location.type.coding.userSelected",
        "path": "Location.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Location.telecom.id",
        "path": "Location.telecom.id",
        "max": "0"
      },
      {
        "id": "Location.telecom.system",
        "path": "Location.telecom.system",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-6.3; LDP-11.3"
          }
        ]
      },
      {
        "id": "Location.telecom.value",
        "path": "Location.telecom.value",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "value"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Location.telecom.value:Email",
        "path": "Location.telecom.value",
        "sliceName": "Email",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-6.4; LDP-11.4"
          }
        ]
      },
      {
        "id": "Location.telecom.value:Email.id",
        "path": "Location.telecom.value.id",
        "max": "0"
      },
      {
        "id": "Location.telecom.value:Contact",
        "path": "Location.telecom.value",
        "sliceName": "Contact",
        "mapping": [
          {
            "identity": "HL7v2.4",
            "map": "LOC-6.7; LDP-11.12"
          },
          {
            "identity": "HL7v2.5",
            "map": "LOC-6.12; LDP-11.12"
          }
        ]
      },
      {
        "id": "Location.telecom.value:Contact.id",
        "path": "Location.telecom.value.id",
        "max": "0"
      },
      {
        "id": "Location.telecom.use",
        "path": "Location.telecom.use",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-6.2; LDP-11.2"
          }
        ]
      },
      {
        "id": "Location.telecom.period",
        "path": "Location.telecom.period",
        "max": "0"
      },
      {
        "id": "Location.address.id",
        "path": "Location.address.id",
        "max": "0"
      },
      {
        "id": "Location.address.extension",
        "path": "Location.address.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Location.address.extension:Parish",
        "path": "Location.address.extension",
        "sliceName": "Parish",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hl7.pt/fhir/StructureDefinition/Address"
            ]
          }
        ]
      },
      {
        "id": "Location.address.type",
        "path": "Location.address.type",
        "max": "0"
      },
      {
        "id": "Location.address.text",
        "path": "Location.address.text",
        "max": "0"
      },
      {
        "id": "Location.address.line",
        "path": "Location.address.line",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.1"
          }
        ]
      },
      {
        "id": "Location.address.city",
        "path": "Location.address.city",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.3"
          }
        ]
      },
      {
        "id": "Location.address.district",
        "path": "Location.address.district",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.8"
          }
        ]
      },
      {
        "id": "Location.address.state",
        "path": "Location.address.state",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.4"
          }
        ]
      },
      {
        "id": "Location.address.postalCode",
        "path": "Location.address.postalCode",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.5"
          }
        ]
      },
      {
        "id": "Location.address.country",
        "path": "Location.address.country",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LOC-5.6"
          }
        ]
      },
      {
        "id": "Location.address.period.id",
        "path": "Location.address.period.id",
        "max": "0"
      },
      {
        "id": "Location.address.period.start",
        "path": "Location.address.period.start",
        "mapping": [
          {
            "identity": "HL7v2.4",
            "map": "LOC-5.12.1"
          },
          {
            "identity": "HL7v2.5",
            "map": "LOC-5.13"
          }
        ]
      },
      {
        "id": "Location.address.period.end",
        "path": "Location.address.period.end",
        "mapping": [
          {
            "identity": "HL7v2.4",
            "map": "LOC-5.12.2"
          },
          {
            "identity": "HL7v2.5",
            "map": "LOC-5.14"
          }
        ]
      },
      {
        "id": "Location.physicalType.id",
        "path": "Location.physicalType.id",
        "max": "0"
      },
      {
        "id": "Location.physicalType.coding.id",
        "path": "Location.physicalType.coding.id",
        "max": "0"
      },
      {
        "id": "Location.physicalType.coding.version",
        "path": "Location.physicalType.coding.version",
        "max": "0"
      },
      {
        "id": "Location.physicalType.coding.code",
        "path": "Location.physicalType.coding.code",
        "mapping": [
          {
            "identity": "HL7v2.x-WARD",
            "map": "LOC-1.1; LDP-1.1; LCC-1.1; LCH-1.1"
          },
          {
            "identity": "HL7v2.x-ROOM",
            "map": "LOC-1.2; LDP-1.2; LCC-1.2; LCH-1.2"
          },
          {
            "identity": "HL7v2.x-BED",
            "map": "LOC-1.3; LDP-1.3; LCC-1.3; LCH-1.3"
          },
          {
            "identity": "HL7v2.x-SITE",
            "map": "LOC-1.4; LDP-1.4; LCC-1.4; LCH-1.4"
          },
          {
            "identity": "HL7v2.x-BUILDING",
            "map": "LOC-1.7; LDP-1.7; LCC-1.7; LCH-1.7"
          },
          {
            "identity": "HL7v2.x-LEVEL",
            "map": "LOC-1.8; LDP-1.8; LCC-1.8; LCH-1.8"
          }
        ]
      },
      {
        "id": "Location.physicalType.coding.userSelected",
        "path": "Location.physicalType.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Location.physicalType.text",
        "path": "Location.physicalType.text",
        "max": "0"
      },
      {
        "id": "Location.position.id",
        "path": "Location.position.id",
        "max": "0"
      },
      {
        "id": "Location.position.altitude",
        "path": "Location.position.altitude",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.id",
        "path": "Location.managingOrganization.id",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.reference",
        "path": "Location.managingOrganization.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Organization/LOC-4; EVN-7; MSH-6"
          }
        ]
      },
      {
        "id": "Location.managingOrganization.type",
        "path": "Location.managingOrganization.type",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.identifier",
        "path": "Location.managingOrganization.identifier",
        "max": "0"
      },
      {
        "id": "Location.managingOrganization.display",
        "path": "Location.managingOrganization.display",
        "max": "0"
      },
      {
        "id": "Location.partOf",
        "path": "Location.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://hl7.pt/fhir/StructureDefinition/PT_Location"
            ]
          }
        ]
      },
      {
        "id": "Location.partOf.id",
        "path": "Location.partOf.id",
        "max": "0"
      },
      {
        "id": "Location.partOf.reference",
        "path": "Location.partOf.reference",
        "mapping": [
          {
            "identity": "HL7v2.x-WARD",
            "map": "Location/LOC-1.1; LDP-1.1; LCC-1.1; LCH-1.1"
          },
          {
            "identity": "HL7v2.x-ROOM",
            "map": "Location/LOC-1.2; LDP-1.2; LCC-1.2; LCH-1.2"
          },
          {
            "identity": "HL7v2.x-BED",
            "map": "Location/LOC-1.3; LDP-1.3; LCC-1.3; LCH-1.3"
          },
          {
            "identity": "HL7v2.x-SITE",
            "map": "Location/LOC-1.4; LDP-1.4; LCC-1.4; LCH-1.4"
          },
          {
            "identity": "HL7v2.x-BUILDING",
            "map": "Location/LOC-1.7; LDP-1.7; LCC-1.7; LCH-1.7"
          },
          {
            "identity": "HL7v2.x-LEVEL",
            "map": "Location/LOC-1.8; LDP-1.8; LCC-1.8; LCH-1.8"
          }
        ]
      },
      {
        "id": "Location.partOf.type",
        "path": "Location.partOf.type",
        "max": "0"
      },
      {
        "id": "Location.partOf.identifier",
        "path": "Location.partOf.identifier",
        "max": "0"
      },
      {
        "id": "Location.partOf.display",
        "path": "Location.partOf.display",
        "comment": "Field mapped according to the code that is in the Location.PhysicalType",
        "max": "0"
      },
      {
        "id": "Location.hoursOfOperation.id",
        "path": "Location.hoursOfOperation.id",
        "max": "0"
      },
      {
        "id": "Location.hoursOfOperation.extension",
        "path": "Location.hoursOfOperation.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "Location.hoursOfOperation.extension:notAvailableTime",
        "path": "Location.hoursOfOperation.extension",
        "sliceName": "notAvailableTime",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hl7.pt/fhir/StructureDefinition/notAvailableTime"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "Location.hoursOfOperation.daysOfWeek",
        "path": "Location.hoursOfOperation.daysOfWeek",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LDP-10.1 & LDP-10.2"
          }
        ]
      },
      {
        "id": "Location.hoursOfOperation.openingTime",
        "path": "Location.hoursOfOperation.openingTime",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LDP-10.3"
          }
        ]
      },
      {
        "id": "Location.hoursOfOperation.closingTime",
        "path": "Location.hoursOfOperation.closingTime",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "LDP-10.4"
          }
        ]
      },
      {
        "id": "Location.availabilityExceptions",
        "path": "Location.availabilityExceptions",
        "max": "0"
      },
      {
        "id": "Location.endpoint",
        "path": "Location.endpoint",
        "max": "0"
      }
    ]
  }
}