Vai al contenuto

Flusso C — Cancellazione prenotazione

Operazione: DELETE /Appointment/{id}
Flusso: C — CUP → gt4medServices → T4MED


Dati del caso di esempio

Campo Valore
T4MED Appointment ID T00450 (da tabella di mappatura, inserita al Flusso A)
ID CUP prenotazione 26B001956

Conformità FHIR R4

Per il Flusso C (DELETE /Appointment/{id}) la specifica T4MED e lo standard FHIR R4 coincidono pienamente:

  • Endpoint: DELETE /Appointment/{id} — identico
  • Corpo: nessuno — identico
  • Risposta: 200 OK o 204 No Content — identico

Non ci sono deviazioni.

La versione estesa e la versione minima coincidono: DELETE non prevede body. L'unico dato necessario è il T4MED Appointment ID nell'URL, ricavato dalla tabella di mappatura interna di gt4medServices.


DELETE fisico — T4MED = FHIR R4

REQUEST

DELETE https://api.t4med.it/fhir/Appointment/T00450
Authorization: ApiKey <api-key>

(nessun corpo)

RESPONSE ATTESA — T4MED = FHIR R4

HTTP/1.1 200 OK
oppure
HTTP/1.1 204 No Content

Entrambe le risposte sono conformi allo standard FHIR R4.

Azione gt4medServices dopo la risposta:

  • Invalidare (o rimuovere) il record 26B001956T00450 dalla tabella di mappatura interna.

Alternativa — Cancellazione logica (PUT status="cancelled")

Alcune implementazioni FHIR R4 non supportano il DELETE fisico e restituiscono HTTP 405 Method Not Allowed. In quel caso è necessaria una cancellazione logica tramite PUT con status = "cancelled". Anche questo approccio è conforme FHIR R4.

Da chiarire con TESI quale modalità T4MED supporta (lacuna L9).

Versione estesa — cancellazione logica

REQUEST

PUT https://api.t4med.it/fhir/Appointment/T00450
Content-Type: application/fhir+json
Authorization: ApiKey <api-key>
{
  "resourceType": "Appointment",
  "id": "T00450",
  "status": "cancelled",
  "cancelationReason": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/appointment-cancellation-reason",
        "code": "oth",
        "display": "Other"
      }
    ]
  },
  "start": "2026-06-03T10:30:00+02:00",
  "end":   "2026-06-03T11:00:00+02:00",
  "participant": [
    {
      "actor": {
        "reference": "Patient/4578934",
        "display": "ROSAVIOLA DALMINA"
      },
      "required": "required",
      "status": "declined"
    }
  ]
}

RESPONSE ATTESA

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Appointment",
  "id": "T00450",
  "status": "cancelled",
  "start": "2026-06-03T10:30:00+02:00",
  "participant": [
    {
      "actor": {
        "reference": "Patient/4578934"
      },
      "status": "declined"
    }
  ]
}

Versione minima — cancellazione logica

REQUEST

PUT https://api.t4med.it/fhir/Appointment/T00450
Content-Type: application/fhir+json
Authorization: ApiKey <api-key>
{
  "resourceType": "Appointment",
  "id": "T00450",
  "status": "cancelled",
  "start": "2026-06-03T10:30:00+02:00",
  "end":   "2026-06-03T11:00:00+02:00",
  "participant": [
    {
      "actor": {
        "reference": "Patient/4578934"
      },
      "status": "declined"
    }
  ]
}

RESPONSE ATTESA

HTTP/1.1 200 OK
Content-Type: application/fhir+json
{
  "resourceType": "Appointment",
  "id": "T00450",
  "status": "cancelled",
  "start": "2026-06-03T10:30:00+02:00",
  "participant": [
    {
      "actor": {
        "reference": "Patient/4578934"
      },
      "status": "declined"
    }
  ]
}