diff --git a/paths/patient_fundusByGroup.yaml b/paths/patient_fundusByGroup.yaml index 7ea2764..f0baa4e 100644 --- a/paths/patient_fundusByGroup.yaml +++ b/paths/patient_fundusByGroup.yaml @@ -49,11 +49,41 @@ get: schema: type: string enum: ['gp', 'specialist', 'unknown', ''] + - name: ifNewerThan + in: query + required: false + description: |- + Useful to check if new data is available relative to an earlier request: Provide the same date as provided in a previous response's `refDate` value. + If no new data is available since then, a `206 - No Content` HTTP response is returned. Date without time part in ISO8601 format. + schema: + type: string + format: date + example: "1970-01-13" - $ref: '../zoo-api.yaml#/components/parameters/Pretty' - - $ref: '../zoo-api.yaml#/components/parameters/RefDateDefaultToday' - $ref: '../zoo-api.yaml#/components/parameters/CareGroup' - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: + '206': + description: |- + No new data is available: No new group report has been constructed with a `refDate` newer than `ifNewerThan`. + '503': + description: The data cannot be provided, because EPD data has not been provided to Zorg op Orde, or ZOO has not had a chance to run the fundus calculations on this data. + content: + application/json: + schema: + type: object + required: + - agb + - regionName + properties: + agb: + description: |- + The same AGB as supplied via authentication or the `agb` parameter: The AGB of the care group being queried. + $ref: ../schemas/agb.yaml + regionName: + description: |- + A human readable name describing the care group being queried (The entity whose AGB code is sent as `agb`). + type: string '200': description: All patients where funduscopy status is relevant are returned. content: @@ -71,10 +101,7 @@ get: agb: description: |- The same AGB as supplied via authentication or the `agb` parameter: The AGB of the care group being queried. - type: integer - format: int32 - minimum: 1 - maximum: 99999999 + $ref: ../schemas/agb.yaml regionName: description: |- A human readable name describing the care group being queried (The entity whose AGB code is sent as `agb`). @@ -83,6 +110,7 @@ get: $ref: ../schemas/date.yaml example: '2024-04-01' description: |- + The date when this report for the The date used for all calculations: Any time spans are relative to this date, any measurement requirements as stated in the care group's policies such as 'must be registered every year or cannot be considered' are applied to this date, anything that occured after this date is ignored. diff --git a/paths/patient_fundusByPractice.yaml b/paths/patient_fundusByPractice.yaml index 3df7887..5ee9469 100644 --- a/paths/patient_fundusByPractice.yaml +++ b/paths/patient_fundusByPractice.yaml @@ -42,10 +42,51 @@ get: schema: type: string enum: ['gp', 'specialist', 'unknown', ''] + - name: ifNewerThan + in: query + required: false + description: |- + Useful to check if new data is available relative to an earlier request: Provide the same date as provided in a previous response's `refDate` value. + If no new data is available since then, a `206 - No Content` HTTP response is returned. Date without time part in ISO8601 format. + schema: + type: string + format: date + example: "1970-01-13" - $ref: '../zoo-api.yaml#/components/parameters/Pretty' - - $ref: '../zoo-api.yaml#/components/parameters/RefDateDefaultToday' - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: + '206': + description: |- + No new data is available: The EPD has not provided new information since `ifNewerThan`, or Zorg op Orde has not had a chance to rerun the fundus calculations on newly provided EPD data. + '503': + description: The data cannot be provided, because EPD data has not been provided to Zorg op Orde, or ZOO has not had a chance to run the fundus calculations on this data. + content: + application/json: + schema: + type: object + required: + - practice + properties: + practice: + type: object + required: + - agb + - name + - gpis + - refDate + properties: + agb: + description: |- + The AGB code of the GP practice whose patients are provided in this object. + $ref: ../schemas/agb.yaml + name: + description: |- + A human readable name describing the GP practice (The entity whose AGB code is sent as `agb`). + type: string + gpis: + $ref: ../schemas/GPIS.yaml + refDate: + $ref: "../schemas/fundus-status.yaml#/properties/refDate" '200': description: All patients where funduscopy status is relevant is returned. content: @@ -53,18 +94,11 @@ get: schema: type: object required: - - refDate - practice + - refDate properties: dict: $ref: '../schemas/TermsDictionary.yaml' - refDate: - $ref: ../schemas/date.yaml - description: |- - The date used for all calculations: Any time spans are relative to this date, any measurement requirements - as stated in the care group's policies such as 'must be registered every year or cannot be considered' are applied - to this date, anything that occured after this date is ignored. - example: '2024-04-01' practice: $ref: "../schemas/fundus-status.yaml" '400': diff --git a/schemas/fundus-status.yaml b/schemas/fundus-status.yaml index a5b2afd..d591b36 100644 --- a/schemas/fundus-status.yaml +++ b/schemas/fundus-status.yaml @@ -3,6 +3,7 @@ required: - agb - name - gpis + - refDate - patients properties: agb: @@ -15,6 +16,14 @@ properties: type: string gpis: $ref: 'GPIS.yaml' + refDate: + $ref: ../schemas/date.yaml + description: |- + The date used for all calculations: Any time spans are relative to this date, any measurement requirements + as stated in the care group's policies such as 'must be registered every year or cannot be considered' are applied + to this date, anything that occured after this date is ignored. The date depends on the last time the EPD system provided + data; generally it will be quite recent. + example: '2024-04-01' patients: type: array items: