{"openapi":"3.0.3","info":{"title":"API FHIR - Agende CUP Lazio (Interrogazioni)","description":"Specifica delle interrogazioni FHIR R5 esposte dal server del CUP Regionale Lazio, basata sulla Implementation Guide \"Agende CUP Lazio\" v0.1.0. Le risorse restituite rispettano i profili LcCup (Schedule, Slot, Appointment). Riferimento: https://simplifier.net/guide/ig-fhir-lazio-crea-sviluppo/Home/API/Interrogazioni-FHIR.page.md\n","version":"0.1.0","contact":{"name":"Lazio Crea","url":"https://simplifier.net/LazioCrea"}},"servers":[{"url":"https://{fhir-base}","description":"Sostituire {fhir-base} con l'URL base dell'ambiente (sviluppo/produzione)","variables":{"fhir-base":{"default":"fhir.sviluppo.laziocrea.it/r5","description":"Host + path base del server FHIR (senza schema)"}}}],"tags":[{"name":"Schedule","description":"Agende ambulatoriali"},{"name":"Slot","description":"Disponibilità (slot) all'interno di un'agenda"},{"name":"Appointment","description":"Prenotazioni"},{"name":"Teleconsulto","description":"Interrogazioni specifiche per agende/slot di teleconsulto (IRT)"}],"components":{"parameters":{"AcceptHeader":{"name":"Accept","in":"header","required":false,"description":"Formato di risposta richiesto","schema":{"type":"string","default":"application/fhir+json","enum":["application/fhir+json"]}},"ProfileFilter":{"name":"_profile","in":"query","required":false,"description":"Filtra per profilo LcCup, se supportato dal server","schema":{"type":"string","example":"https://www.fhir.laziocrea.it/StructureDefinition/lccup-schedule"}},"ScheduleActor":{"name":"actor","in":"query","required":false,"description":"Riferimento a Location, Organization o HealthcareService dell'ambulatorio (es. Location/{id})\n","schema":{"type":"string","example":"Location/123"}},"ScheduleActive":{"name":"active","in":"query","required":false,"description":"Filtra sulle agende attive","schema":{"type":"boolean","example":true}},"ScheduleSpecialty":{"name":"specialty","in":"query","required":false,"description":"Codice SNOMED della specialità, in formato system|code (es. Cardiologia = 394579002)\n","schema":{"type":"string","example":"http://snomed.info/sct|394579002"}},"ScheduleServiceType":{"name":"service-type","in":"query","required":false,"description":"Codice SNOMED del tipo prestazione, in formato system|code","schema":{"type":"string","example":"http://snomed.info/sct|408471009"}},"ScheduleIdentifier":{"name":"identifier","in":"query","required":false,"description":"Identificatore CUP dell'agenda, in formato system|value","schema":{"type":"string","example":"https://cup.regione.lazio.it/agende|AGN-LAZIO-CARDIO-001"}},"ScheduleId":{"name":"id","in":"path","required":true,"description":"Identificativo logico della risorsa Schedule","schema":{"type":"string"}},"SlotStatus":{"name":"status","in":"query","required":false,"description":"Stato dello slot","schema":{"type":"string","enum":["free","busy","busy-unavailable","busy-tentative","entered-in-error"],"example":"free"}},"SlotStartRange":{"name":"start","in":"query","required":false,"description":"Filtro sulla data/ora di inizio slot. Ripetibile per definire un intervallo, usando i prefissi FHIR ge/le (es. ge2025-04-01T00:00:00+02:00)\n","schema":{"type":"array","items":{"type":"string","example":"ge2025-04-01T00:00:00+02:00"}},"style":"form","explode":true},"SlotSchedule":{"name":"schedule","in":"query","required":false,"description":"Riferimento all'agenda (es. Schedule/{id})","schema":{"type":"string","example":"Schedule/123"}},"SlotId":{"name":"id","in":"path","required":true,"description":"Identificativo logico della risorsa Slot","schema":{"type":"string"}},"AppointmentIdentifier":{"name":"identifier","in":"query","required":false,"description":"Codice prenotazione CUP, in formato system|value","schema":{"type":"string","example":"https://cup.regione.lazio.it/prenotazioni|PRN-2025-00123456"}},"AppointmentDateRange":{"name":"date","in":"query","required":false,"description":"Filtro sulla data dell'appuntamento. Ripetibile con prefissi ge/le per definire un intervallo\n","schema":{"type":"array","items":{"type":"string","example":"ge2025-04-15T00:00:00+02:00"}},"style":"form","explode":true},"AppointmentStatus":{"name":"status","in":"query","required":false,"description":"Stato della prenotazione","schema":{"type":"string","enum":["proposed","pending","booked","arrived","fulfilled","cancelled","noshow","entered-in-error","checked-in","waitlist"],"example":"booked"}}},"schemas":{"Bundle":{"type":"object","description":"Bundle FHIR contenente i risultati della ricerca (searchset)","properties":{"resourceType":{"type":"string","example":"Bundle"},"type":{"type":"string","example":"searchset"},"total":{"type":"integer"},"entry":{"type":"array","items":{"type":"object","properties":{"fullUrl":{"type":"string"},"resource":{"type":"object"}}}}}},"Schedule":{"type":"object","description":"Risorsa FHIR Schedule (profilo LcCup)","properties":{"resourceType":{"type":"string","example":"Schedule"},"id":{"type":"string"},"active":{"type":"boolean"},"actor":{"type":"array","items":{"type":"object"}},"specialty":{"type":"array","items":{"type":"object"}},"serviceType":{"type":"array","items":{"type":"object"}}}},"Slot":{"type":"object","description":"Risorsa FHIR Slot (profilo LcCup)","properties":{"resourceType":{"type":"string","example":"Slot"},"id":{"type":"string"},"status":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"schedule":{"type":"object"}}},"Appointment":{"type":"object","description":"Risorsa FHIR Appointment (profilo LcCup)","properties":{"resourceType":{"type":"string","example":"Appointment"},"id":{"type":"string"},"status":{"type":"string"},"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"},"identifier":{"type":"array","items":{"type":"object"}}}},"OperationOutcome":{"type":"object","description":"Esito operazione / errore FHIR","properties":{"resourceType":{"type":"string","example":"OperationOutcome"},"issue":{"type":"array","items":{"type":"object"}}}}},"responses":{"BundleResponse":{"description":"Bundle FHIR con i risultati della ricerca","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Bundle"}}}},"NotFound":{"description":"Risorsa non trovata","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}},"BadRequest":{"description":"Parametri di ricerca non validi","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/OperationOutcome"}}}}}},"paths":{"/Schedule":{"get":{"tags":["Schedule"],"summary":"Ricerca agende","description":"Ricerca di agende per struttura (actor), specialità, tipo prestazione o identificatore CUP. I filtri sono combinabili.\n","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"$ref":"#/components/parameters/ProfileFilter"},{"$ref":"#/components/parameters/ScheduleActor"},{"$ref":"#/components/parameters/ScheduleActive"},{"$ref":"#/components/parameters/ScheduleSpecialty"},{"$ref":"#/components/parameters/ScheduleServiceType"},{"$ref":"#/components/parameters/ScheduleIdentifier"}],"responses":{"200":{"$ref":"#/components/responses/BundleResponse"},"400":{"$ref":"#/components/responses/BadRequest"}}}},"/Schedule/{id}":{"get":{"tags":["Schedule"],"summary":"Recupera una singola agenda per id","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"$ref":"#/components/parameters/ScheduleId"}],"responses":{"200":{"description":"Risorsa Schedule","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/Slot":{"get":{"tags":["Slot"],"summary":"Ricerca slot (disponibilità)","description":"Ricerca di slot liberi per intervallo di date e/o per agenda specifica. Per cercare gli slot di una specialità, effettuare prima una ricerca su /Schedule con il parametro specialty, poi interrogare /Slot con schedule=Schedule/{id-agenda}.\n","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"$ref":"#/components/parameters/SlotStatus"},{"$ref":"#/components/parameters/SlotStartRange"},{"$ref":"#/components/parameters/SlotSchedule"}],"responses":{"200":{"$ref":"#/components/responses/BundleResponse"},"400":{"$ref":"#/components/responses/BadRequest"}}}},"/Slot/{id}":{"get":{"tags":["Slot"],"summary":"Recupera un singolo slot per id","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"$ref":"#/components/parameters/SlotId"}],"responses":{"200":{"description":"Risorsa Slot","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Slot"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/Appointment":{"get":{"tags":["Appointment"],"summary":"Ricerca prenotazioni","description":"Ricerca di prenotazioni per codice CUP (identifier) o per periodo e stato.\n","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"$ref":"#/components/parameters/AppointmentIdentifier"},{"$ref":"#/components/parameters/AppointmentDateRange"},{"$ref":"#/components/parameters/AppointmentStatus"}],"responses":{"200":{"$ref":"#/components/responses/BundleResponse"},"400":{"$ref":"#/components/responses/BadRequest"}}}},"/Appointment/{id}":{"get":{"tags":["Appointment"],"summary":"Recupera una singola prenotazione per id","parameters":[{"$ref":"#/components/parameters/AcceptHeader"},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Risorsa Appointment","content":{"application/fhir+json":{"schema":{"$ref":"#/components/schemas/Appointment"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}}},"externalDocs":{"description":"Implementation Guide FHIR - Agende CUP Lazio (Interrogazioni FHIR) - documentazione originale su Simplifier.net\n","url":"https://simplifier.net/guide/ig-fhir-lazio-crea-sviluppo/Home/API/Interrogazioni-FHIR.page.md?version=current"}}