{
  "resourceType": "Bundle",
  "id": "EsempioBundleADT",
  "meta": {
    "profile": [
      "https://example.org/fhir/StructureDefinition/MyBundle"
    ]
  },
  "type": "message",
  "timestamp": "2024-05-13T09:25:50.887+00:00",
  "entry": [
    {
      "fullUrl": "MessageHeader/EsempioMessageheaderADT",
      "resource": {
        "resourceType": "MessageHeader",
        "id": "EsempioMessageheaderADT",
        "meta": {
          "profile": [
            "http://hl7.org/fhir/StructureDefinition/MessageHeader"
          ]
        },
        "extension": [
          {
            "extension": [
              {
                "url": "name",
                "valueCode": "nome operatore"
              },
              {
                "url": "surname",
                "valueCode": "cognome operatore"
              },
              {
                "url": "code",
                "valueCode": "nome.cognome"
              }
            ],
            "url": "http://example.org/FHIR/schema/messageHeader-operator"
          }
        ],
        "eventCoding": {
          "system": "http://example.org/CodeSystem/message-events",
          "code": "ADT_A01",
          "display": "inserimento ricovero"
        },
        "destination": [
          {
            "name": "ADT_REGIONALE",
            "endpoint": "http://adt.reg.it/ADT_A01"
          }
        ],
        "source": {
          "name": "LDA-REGIONALE",
          "endpoint": "http://lda.reg.it"
        }
      }
    },
    {
      "fullUrl": "Encounter/IdEncounter",
      "resource": {
        "resourceType": "Encounter",
        "id": "IdEncounter",
        "meta": {
          "profile": [
            "https://example.org/fhir/StructureDefinition/Encounter"
          ]
        },
        "extension": [
          {
            "url": "http://example.org/FHIR/schema/encounter-dataPrericovero",
            "valuePeriod": {
              "start": "2024-05-05T14:33:30+00:00"
            }
          }
        ],
        "identifier": [
          {
            "system": "http://example.org/identifier/nosologico",
            "value": "2024000000"
          }
        ],
        "status": "in-progress",
        "class": {
          "system": "http://terminology.hl7.org/ValueSet/v3-ActEncounterCode",
          "code": "IMP",
          "display": "inpatient encounter"
        },
        "type": [
          {
            "coding": [
              {
                "system": "http://example.org/FHIR/schema/encounter-typeCode",
                "code": "1",
                "display": "Programmato non urgente"
              }
            ]
          }
        ],
        "subject": {
          "reference": "Patient/IdPaziente"
        },
        "participant": [
          {
            "individual": {
              "reference": "Practitioner/IdMedico"
            }
          }
        ],
        "period": {
          "start": "2022-02-01T15:33:30+00:00"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://hl7.org/fhir/sid/icd-9-cm",
                "code": "codiceDiagnosi",
                "display": "descrizioneDiagnosi"
              }
            ]
          }
        ],
        "hospitalization": {
          "extension": [
            {
              "url": "http://example.org/FHIR/schema/encounter-regime",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://example.org/FHIR/schema/encounter-regimeCode",
                    "code": "I",
                    "display": "ORDINARIO"
                  }
                ]
              }
            },
            {
              "url": "http://example.org/FHIR/schema/encounter-onere",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://example.org/FHIR/schema/encounter-onereCode",
                    "code": "1",
                    "display": "Servizio Sanitario Nazionale"
                  }
                ]
              }
            }
          ],
          "preAdmissionIdentifier": {
            "system": "http://example.org/FHIR/schema/preAdmissionIdentifier",
            "value": "2024000000"
          }
        },
        "location": [
          {
            "location": {
              "reference": "Location/IdReparto"
            },
            "physicalType": {
              "coding": [
                {
                  "system": "http://example.org/FHIR/schema/location-type",
                  "code": "wa",
                  "display": "REPARTO"
                }
              ]
            }
          },
          {
            "location": {
              "reference": "Location/IdStanza"
            },
            "physicalType": {
              "coding": [
                {
                  "system": "http://example.org/FHIR/schema/location-type",
                  "code": "ro",
                  "display": "ROOM"
                }
              ]
            }
          },
          {
            "location": {
              "reference": "Location/IdLetto"
            },
            "physicalType": {
              "coding": [
                {
                  "system": "http://example.org/FHIR/schema/location-type",
                  "code": "bd",
                  "display": "BED"
                }
              ]
            }
          }
        ],
        "serviceProvider": {
          "reference": "Organization/IdPresidio"
        }
      }
    },
    {
      "fullUrl": "Patient/IdPaziente",
      "resource": {
        "resourceType": "Patient",
        "id": "IdPaziente",
        "meta": {
          "profile": [
            "http://hl7.it/fhir/StructureDefinition/Patient-it-base"
          ]
        },
        "extension": [
          {
            "extension": [
              {
                "url": "code",
                "valueCodeableConcept": {
                  "coding": [
                    {
                      "system": "https://terminology.example.org/CodeSystem/istat-unitaAmministrativeTerritorialiEstere",
                      "code": "100",
                      "display": "Italia"
                    }
                  ]
                }
              }
            ],
            "url": "http://hl7.org/fhir/StructureDefinition/patient-citizenship"
          },
          {
            "url": "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
            "valueAddress": {
              "_country": {
                "extension": [
                  {
                    "url": "http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding",
                    "valueCoding": {
                      "system": "https://terminology.example.org/CodeSystem/istat-unitaAmministrativeTerritorialiEstere",
                      "code": "100",
                      "display": "Italia"
                    }
                  }
                ]
              }
            }
          }
        ],
        "identifier": [
          {
            "type": {
              "coding": [
                {
                  "code": "CF",
                  "display": "Identificativo Codice Fiscale"
                }
              ]
            },
            "system": "http://hl7.it/sid/codiceFiscale",
            "value": "XXXXXX95X68X892X",
            "assigner": {
              "display": "MINISTERO DELLE FINANZE"
            }
          }
        ],
        "name": [
          {
            "family": "COGNOME PAZIENTE",
            "given": [
              "NOME PAZIENTE"
            ]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "(03) 5555 6473",
            "use": "work",
            "rank": 1
          },
          {
            "system": "phone",
            "value": "(03) 3410 5613",
            "use": "mobile",
            "rank": 2
          }
        ],
        "gender": "male",
        "birthDate": "2000-05-20",
        "deceasedBoolean": false,
        "address": [
          {
            "extension": [
              {
                "url": "http://hl7.org/fhir/StructureDefinition/address-official",
                "valueBoolean": true
              }
            ],
            "use": "home",
            "type": "physical",
            "line": [
              "VIA PROVA, 5"
            ],
            "city": "Napoli",
            "_city": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding",
                  "valueCoding": {
                    "system": "https://terminology.example.org/CodeSystem/istat-unitaAmministrativeTerritoriali",
                    "code": "063049",
                    "display": "Napoli"
                  }
                }
              ]
            },
            "postalCode": "80100",
            "_country": {
              "extension": [
                {
                  "url": "http://hl7.org/fhir/StructureDefinition/iso21090-SC-coding",
                  "valueCoding": {
                    "system": "https://terminology.example.org/CodeSystem/istat-unitaAmministrativeTerritorialiEstere",
                    "code": "100",
                    "display": "Italia"
                  }
                }
              ]
            }
          }
        ],
        "maritalStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
              "code": "T",
              "display": "Stato di convivenza"
            }
          ],
          "text": "Stato di convivenza"
        },
        "communication": [
          {
            "language": {
              "text": "italiano"
            }
          }
        ]
      }
    },
    {
      "fullUrl": "Location/IdReparto",
      "resource": {
        "resourceType": "Location",
        "id": "IdReparto",
        "meta": {
          "profile": [
            "https://example.org/fhir/StructureDefinition/Location"
          ]
        },
        "extension": [
          {
            "url": "http://example.org/FHIR/schema/location-branca",
            "valueCodeableConcept": {
              "coding": [
                {
                  "system": "http://example.org/FHIR/schema/location-brancaCode",
                  "code": "codiceBranca"
                }
              ]
            }
          }
        ],
        "identifier": [
          {
            "system": "http://example.org/FHIR/schema/location-identifier",
            "value": "REP1"
          }
        ],
        "status": "active",
        "name": "Nome reparto",
        "physicalType": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "code": "wa",
              "display": "Ward"
            }
          ]
        },
        "managingOrganization": {
          "reference": "Organization/IdPresidio"
        }
      }
    },
    {
      "fullUrl": "Location/IdStanza",
      "resource": {
        "resourceType": "Location",
        "id": "IdStanza",
        "meta": {
          "profile": [
            "https://example.org/fhir/StructureDefinition/Location"
          ]
        },
        "identifier": [
          {
            "system": "http://example.org/FHIR/schema/location-identifier",
            "value": "ST1"
          }
        ],
        "status": "active",
        "name": "STANZA 1",
        "description": "STANZA 1",
        "type": [
          {
            "coding": [
              {
                "system": "http://example.org/FHIR/schema/location-sex-type",
                "code": "M",
                "display": "stanza per paziente con sesso maschile"
              }
            ]
          }
        ],
        "physicalType": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "code": "ro",
              "display": "Room"
            }
          ]
        },
        "managingOrganization": {
          "reference": "Organization/IdPresidio"
        },
        "partOf": {
          "reference": "Location/IdReparto"
        }
      }
    },
    {
      "fullUrl": "Location/IdLetto",
      "resource": {
        "resourceType": "Location",
        "id": "IdLetto",
        "meta": {
          "profile": [
            "https://example.org/fhir/StructureDefinition/Location"
          ]
        },
        "identifier": [
          {
            "system": "http://example.org/FHIR/schema/location-identifier",
            "value": "BED1"
          }
        ],
        "status": "active",
        "operationalStatus": {
          "system": "http://terminology.hl7.org/CodeSystem/v2-0116",
          "code": "K",
          "display": "Contaminated"
        },
        "name": "BED1",
        "description": "BED1",
        "type": [
          {
            "coding": [
              {
                "system": "http://example.org/FHIR/schema/location-service-type",
                "code": "ALP",
                "display": "posto letto privati"
              }
            ]
          }
        ],
        "physicalType": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
              "code": "bd",
              "display": "Bed"
            }
          ]
        },
        "managingOrganization": {
          "reference": "Organization/IdPresidio"
        },
        "partOf": {
          "reference": "Location/IdStanza"
        }
      }
    },
    {
      "fullUrl": "Organization/IdPresidio",
      "resource": {
        "resourceType": "Organization",
        "id": "IdPresidio",
        "meta": {
          "profile": [
            "https://example.org/fhir/StructureDefinition/Organization"
          ]
        },
        "identifier": [
          {
            "system": "http://terminology.hl7.it/CodeSystem/minsan-hsp",
            "value": "codicePresidio"
          }
        ],
        "active": true,
        "name": "Nome Presidio"
      }
    },
    {
      "fullUrl": "Practitioner/IdMedico",
      "resource": {
        "resourceType": "Practitioner",
        "id": "IdMedico",
        "meta": {
          "profile": [
            "http://hl7.it/fhir/StructureDefinition/Practitioner-it-base"
          ]
        },
        "identifier": [
          {
            "type": {
              "text": "CF"
            },
            "system": "http://hl7.it/sid/codiceFiscale",
            "value": "XXXXXXXXXXXXXXXX"
          }
        ],
        "active": true,
        "name": [
          {
            "family": "COGNOME_MEDICO",
            "given": [
              "NOME_MEDICO"
            ]
          }
        ],
        "gender": "male"
      }
    }
  ]
}