Flusso A — Nuova prenotazione televisita¶
Operazione: POST /Appointment (T4MED) / POST / (FHIR R4 standard)
Flusso: A — CUP → gt4medServices → T4MED
Dati del caso di esempio¶
| Campo | Valore |
|---|---|
| Paziente | ROSAVIOLA DALMINA (nome di fantasia) |
| Codice fiscale | RSVDMN11A41H620X |
| Cod. ospedaliero | 4578934 |
| Data nascita | 1911-12-10 — Rovigo |
| Sesso | F |
| Televisita | 2026-06-03T10:30:00+02:00 → 11:00:00+02:00 |
| ASL | VCO, cod. ASL 209, regione Piemonte 010 |
| Codice FLS11 | 010209 |
| Presidio | Ospedale di Verbania, cod. STS11 000256 |
| Reparto | Nefrologia e Dialisi, cod. NEF001 |
| Ricetta (NRE) | 010A900000112233 |
| Prestazione | 89.01.B — Visita nefrologica di controllo |
| ID CUP prenotazione | 26B001956 |
| T4MED Appointment ID | T00450 (restituito nella risposta) |
Confronto T4MED / FHIR R4¶
| Elemento | Spec T4MED | FHIR R4 standard |
|---|---|---|
| Endpoint | POST /fhir/Appointment [D01] |
POST /fhir |
| Corpo request | Bundle transaction | Bundle transaction (identico) |
| Risposta | singola Appointment [D02] | Bundle transaction-response |
[D01] Deviazione: FHIR R4 prescrive
POST /fhir(base URL) per i Bundle transaction.
[D02] Assunzione da confermare con TESI. Vedere lacuna L1.
Parte 1 — Messaggi conformi alla specifica T4MED¶
Versione estesa¶
Contiene: Patient completo, ServiceRequest (ricetta/prestazione), Appointment con tutti i partecipanti.
REQUEST¶
POST https://api.t4med.it/fhir/Appointment
Content-Type: application/fhir+json
Authorization: ApiKey <api-key>
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:a3f1c24e-7b82-4d5f-9e16-2c4a8f3b7d91",
"resource": {
"resourceType": "Patient",
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/patient-birthPlace",
"valueAddress": {
"city": "Rovigo",
"country": "IT"
}
}
],
"identifier": [
{
"system": "urn:oid:2.16.840.1.113883.2.9.4.3.2",
"value": "RSVDMN11A41H620X"
},
{
"system": "urn:local:asl-vco:id-paziente",
"value": "4578934"
}
],
"name": [
{
"family": "ROSAVIOLA",
"given": [ "DALMINA" ]
}
],
"gender": "female",
"birthDate": "1911-12-10"
},
"request": {
"method": "POST",
"url": "Patient",
"ifNoneExist": "identifier=urn:oid:2.16.840.1.113883.2.9.4.3.2|RSVDMN11A41H620X"
}
},
{
"fullUrl": "urn:uuid:b7e92c83-1f64-4a3c-8d27-5e9b1a4c8f72",
"resource": {
"resourceType": "ServiceRequest",
"status": "active",
"intent": "order",
"identifier": [
{
"system": "urn:oid:2.16.840.1.113883.2.9.4.3.8",
"value": "010A900000112233"
}
],
"code": {
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.9.2.10.6.11",
"code": "89.01.B",
"display": "Visita nefrologica di controllo"
}
]
},
"subject": {
"reference": "urn:uuid:a3f1c24e-7b82-4d5f-9e16-2c4a8f3b7d91"
},
"authoredOn": "2026-06-03",
"performer": [
{
"identifier": {
"system": "urn:oid:2.16.840.1.113883.2.9.4.1.1",
"value": "010209"
},
"display": "ASL VCO - Ospedale di Verbania"
}
]
},
"request": {
"method": "POST",
"url": "ServiceRequest"
}
},
{
"fullUrl": "urn:uuid:c5d8a619-3e74-4b2d-af38-7d1c9b2e5f84",
"resource": {
"resourceType": "Appointment",
"identifier": [
{
"system": "urn:local:cup:id-prenotazione",
"value": "26B001956"
}
],
"status": "booked",
"serviceType": [
{
"coding": [
{
"system": "urn:oid:2.16.840.1.113883.2.9.2.10.6.11",
"code": "89.01.B",
"display": "Visita nefrologica di controllo"
}
]
}
],
"start": "2026-06-03T10:30:00+02:00",
"end": "2026-06-03T11:00:00+02:00",
"basedOn": [
{
"reference": "urn:uuid:b7e92c83-1f64-4a3c-8d27-5e9b1a4c8f72"
}
],
"participant": [
{
"actor": {
"reference": "urn:uuid:a3f1c24e-7b82-4d5f-9e16-2c4a8f3b7d91",
"display": "ROSAVIOLA DALMINA"
},
"required": "required",
"status": "accepted"
},
{
"actor": {
"type": "HealthcareService",
"identifier": {
"system": "urn:local:asl-vco:reparto",
"value": "NEF001"
},
"display": "Reparto Nefrologia e Dialisi - Ospedale di Verbania"
},
"required": "required",
"status": "accepted"
},
{
"actor": {
"type": "Location",
"identifier": {
"system": "urn:oid:2.16.840.1.113883.2.9.4.1.3",
"value": "000256"
},
"display": "Presidio Ospedaliero di Verbania"
},
"required": "required",
"status": "accepted"
}
]
},
"request": {
"method": "POST",
"url": "Appointment"
}
}
]
}
RESPONSE ATTESA — T4MED (assunzione [D02], da confermare con TESI)¶
{
"resourceType": "Appointment",
"id": "T00450",
"status": "booked",
"serviceType": [
{
"coding": [
{
"code": "89.01.B",
"display": "Visita nefrologica di controllo"
}
]
}
],
"start": "2026-06-03T10:30:00+02:00",
"participant": [
{
"actor": {
"reference": "Patient/4578934",
"display": "ROSAVIOLA DALMINA"
},
"required": "required",
"status": "accepted"
}
]
}
Azione gt4medServices dopo la risposta:
- Leggere
response.id→"T00450" - Salvare in tabella di mappatura:
26B001956→T00450(CUP Appointment ID → T4MED Appointment ID)RSVDMN11A41H620X→4578934(CF → T4MED Patient ID, da confermare)
Versione minima¶
Solo identificativi paziente (CF, cod. ospedaliero) e dati essenziali della prenotazione.
REQUEST¶
POST https://api.t4med.it/fhir/Appointment
Content-Type: application/fhir+json
Authorization: ApiKey <api-key>
{
"resourceType": "Bundle",
"type": "transaction",
"entry": [
{
"fullUrl": "urn:uuid:d2b47f95-6c13-4e8a-b249-8f5e3a7c1d63",
"resource": {
"resourceType": "Patient",
"identifier": [
{
"system": "urn:oid:2.16.840.1.113883.2.9.4.3.2",
"value": "RSVDMN11A41H620X"
},
{
"system": "urn:local:asl-vco:id-paziente",
"value": "4578934"
}
]
},
"request": {
"method": "POST",
"url": "Patient",
"ifNoneExist": "identifier=urn:oid:2.16.840.1.113883.2.9.4.3.2|RSVDMN11A41H620X"
}
},
{
"fullUrl": "urn:uuid:e9c61a47-2f85-4d7b-9c54-1a8d6b3e9f25",
"resource": {
"resourceType": "Appointment",
"identifier": [
{
"system": "urn:local:cup:id-prenotazione",
"value": "26B001956"
}
],
"status": "booked",
"start": "2026-06-03T10:30:00+02:00",
"end": "2026-06-03T11:00:00+02:00",
"participant": [
{
"actor": {
"reference": "urn:uuid:d2b47f95-6c13-4e8a-b249-8f5e3a7c1d63"
},
"status": "accepted"
}
]
},
"request": {
"method": "POST",
"url": "Appointment"
}
}
]
}
Parte 2 — Messaggi conformi allo standard FHIR R4¶
Il corpo del Bundle è identico alla Parte 1. Le differenze sono: endpoint POST /fhir e risposta Bundle transaction-response.
Versione estesa — FHIR R4 conforme¶
REQUEST¶
(corpo Bundle identico alla versione estesa T4MED sopra)
RESPONSE ATTESA — FHIR R4 standard¶
{
"resourceType": "Bundle",
"type": "transaction-response",
"entry": [
{
"response": {
"status": "201 Created",
"location": "Patient/4578934/_history/1",
"etag": "W/\"1\""
}
},
{
"response": {
"status": "201 Created",
"location": "ServiceRequest/sr001/_history/1"
}
},
{
"response": {
"status": "201 Created",
"location": "Appointment/T00450/_history/1"
}
}
]
}
Azione gt4medServices dopo la risposta:
- Leggere
entry[2].response.location→"Appointment/T00450/_history/1" - Estrarre ID:
split("/")[1]→"T00450" - Salvare in tabella di mappatura:
26B001956→T00450
Nota: se il Patient già esiste (ifNoneExist corrisponde), la prima entry restituisce
"status": "200 OK"con la location del paziente esistente.