diff --git a/paths/patient_fundusByGroup.yaml b/paths/patient_fundusByGroup.yaml index 84c03fc..4203441 100644 --- a/paths/patient_fundusByGroup.yaml +++ b/paths/patient_fundusByGroup.yaml @@ -52,7 +52,7 @@ get: - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: '200': - description: All patients where funduscopy status is relevant is returned. + description: All patients where funduscopy status is relevant are returned. content: application/json: schema: @@ -77,13 +77,12 @@ get: A human readable name describing the care group being queried (The entity whose AGB code is sent as `agb`). type: string refDate: + $ref: ../schemas/date.yaml + example: '2024-04-01' 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. - type: string - format: date - example: '2024-04-01' practices: description: |- One entry for each practice that is part of this care group and participates in at least one funduscopy-related care program. diff --git a/paths/patient_fundusByPractice.yaml b/paths/patient_fundusByPractice.yaml index fa70785..1a0dde9 100644 --- a/paths/patient_fundusByPractice.yaml +++ b/paths/patient_fundusByPractice.yaml @@ -56,12 +56,11 @@ get: 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. - type: string - format: date example: '2024-04-01' practice: $ref: "../schemas/fundus-status.yaml" diff --git a/paths/qoc_checkupList_{setKey}.yaml b/paths/qoc_checkupList_{setKey}.yaml index edad14b..eb32c23 100644 --- a/paths/qoc_checkupList_{setKey}.yaml +++ b/paths/qoc_checkupList_{setKey}.yaml @@ -18,9 +18,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml - name: addr in: query required: false @@ -138,8 +136,7 @@ get: format: int32 description: The BSN (dutch social security number) of the patient. dob: - type: string - format: date + $ref: ../schemas/date.yaml description: Date of birth of the patient. email: type: string diff --git a/paths/qoc_indicator_{setKey}_{indicatorKey}_participants.yaml b/paths/qoc_indicator_{setKey}_{indicatorKey}_participants.yaml index 2cc055b..56d46ef 100644 --- a/paths/qoc_indicator_{setKey}_{indicatorKey}_participants.yaml +++ b/paths/qoc_indicator_{setKey}_{indicatorKey}_participants.yaml @@ -23,9 +23,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml - $ref: '../zoo-api.yaml#/components/parameters/CareGroup' - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: diff --git a/paths/qoc_indicator_{setKey}_{indicatorKey}_patients.yaml b/paths/qoc_indicator_{setKey}_{indicatorKey}_patients.yaml index 54e62c0..1b1942f 100644 --- a/paths/qoc_indicator_{setKey}_{indicatorKey}_patients.yaml +++ b/paths/qoc_indicator_{setKey}_{indicatorKey}_patients.yaml @@ -22,9 +22,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: '200': diff --git a/paths/qoc_indicatorset_{setKey}.yaml b/paths/qoc_indicatorset_{setKey}.yaml index 48a19ae..be073d7 100644 --- a/paths/qoc_indicatorset_{setKey}.yaml +++ b/paths/qoc_indicatorset_{setKey}.yaml @@ -16,9 +16,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml - $ref: '../zoo-api.yaml#/components/parameters/Authorization' responses: '200': diff --git a/paths/qoc_list-groups.yaml b/paths/qoc_list-groups.yaml index 52f5045..268dfa0 100644 --- a/paths/qoc_list-groups.yaml +++ b/paths/qoc_list-groups.yaml @@ -9,9 +9,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml responses: '200': description: >- @@ -23,9 +21,7 @@ get: properties: refDate: description: 'Groups reported are available for this date (dutch: _peildatum_).' - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml groups: description: A list of available groups. type: array diff --git a/paths/qoc_participating-practices.yaml b/paths/qoc_participating-practices.yaml index 561ab3e..786e9b3 100644 --- a/paths/qoc_participating-practices.yaml +++ b/paths/qoc_participating-practices.yaml @@ -23,9 +23,7 @@ get: The date in `2023-04-01` format; defaults to the first day in the next quarter, e.g. on april 5th 2023, defaults to `2023-07-01`. required: false schema: - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml responses: '200': description: >- @@ -47,9 +45,7 @@ get: example: 2023-04-01T12:30:00.000Z refDate: description: 'Groups reported are available for this date (dutch: _peildatum_).' - type: string - format: date - example: 2023-04-01 + $ref: ../schemas/date.yaml key: description: Repeats the `setKey` parameter, if present. type: string diff --git a/schemas/IndicatorSet.yaml b/schemas/IndicatorSet.yaml index 29fa5ce..1f9f9c1 100644 --- a/schemas/IndicatorSet.yaml +++ b/schemas/IndicatorSet.yaml @@ -19,9 +19,7 @@ properties: example: Diabetes Mellitus type 2 – per InEen 2023 accreditatie refDate: description: 'All calculations are done based on this date (dutch: _peildatum_).' - type: string - format: date - example: 2023-04-01 + $ref: ./date.yaml calculating: description: |- Calculating an indicator set report takes some time; this API responds with a `calculating` value of less than 1.0 and diff --git a/schemas/PatIdentity.yaml b/schemas/PatIdentity.yaml index 6fc3ff2..69a7692 100644 --- a/schemas/PatIdentity.yaml +++ b/schemas/PatIdentity.yaml @@ -117,8 +117,7 @@ patid: patUnid: $ref: 'pat-patUnid.yaml' startDate: - type: string - format: date + $ref: ./date.yaml description: |- Date patient joined the practice (dutch: _inschrijf datum_). @@ -128,8 +127,7 @@ startDate: back you want to go). example: 1994-08-20 endDate: - type: string - format: date + $ref: ./date.yaml description: |- If present, patient has exited the practice on this date. (dutch: _uitschrijf datum_). default: "" diff --git a/schemas/fundus-status.yaml b/schemas/fundus-status.yaml index a388cdc..b51e540 100644 --- a/schemas/fundus-status.yaml +++ b/schemas/fundus-status.yaml @@ -110,8 +110,7 @@ properties: The date of the last time the patient has received Funduscopy; will be `null` if no funduscopy is registered. The most recent measurement date is provided, even if only one eye was measured on that date. - type: string - format: date + $ref: ./date.yaml retinoVal: description: |- The normalized retinopathy category for the worst eye, in terms of the 2017 Retinopathy level standard (richtlijn Diabetische Retinopathie 2017). @@ -135,8 +134,7 @@ properties: properties: lastEval: description: Same as previous level, specifically for left eye. - type: string - format: date + $ref: ./date.yaml retinoVal: description: Same as previous level, specifically for left eye. type: integer @@ -171,8 +169,7 @@ properties: - retinoVal properties: lastEval: - type: string - format: date + $ref: ./date.yaml retinoVal: type: integer format: int32 diff --git a/schemas/med_dossier/Contraindication.yaml b/schemas/med_dossier/Contraindication.yaml index bb48b34..dda3681 100644 --- a/schemas/med_dossier/Contraindication.yaml +++ b/schemas/med_dossier/Contraindication.yaml @@ -14,6 +14,4 @@ properties: when: description: |- If present, the date when this contraindication was registered. - type: string - format: date - example: "2019-02-05" + $ref: ../date.yaml \ No newline at end of file diff --git a/schemas/med_dossier/Correspondence.yaml b/schemas/med_dossier/Correspondence.yaml index 6d6b4e6..204a4cc 100644 --- a/schemas/med_dossier/Correspondence.yaml +++ b/schemas/med_dossier/Correspondence.yaml @@ -19,9 +19,7 @@ properties: when: description: |- The date when this correspondence was received or sent. - type: string - format: date - example: "2023-03-31" + $ref: ../date.yaml speciality_code: description: |- A short memocode representing the speciality of `other`. For example, `"OOG"` (eye specialist), `"CHI"` (Surgery), etc. Often blank. diff --git a/schemas/med_dossier/Episode.yaml b/schemas/med_dossier/Episode.yaml index 44a31a5..cbc720a 100644 --- a/schemas/med_dossier/Episode.yaml +++ b/schemas/med_dossier/Episode.yaml @@ -21,22 +21,16 @@ properties: Always provided, but may contain the sentinel value of `1900-01-01` if the source doesn't have a start date. Generally such episodes are to be treated as having always been part of the patient's dossier. - type: string - format: date - example: 1900-01-01 + $ref: ../date.yaml end: description: |- If the episode has been determined to no longer be relevant (for example, cured), the date when the episode was closed. - type: string - format: date - example: "2022-12-31" + $ref: ../date.yaml mut: description: |- The last time an event (for example, seeing the patient for chronic care related to this episode) was recorded in context of this episode. Is guaranteed to be present and will never be earlier than `start`. - type: string - format: date - example: "2022-10-20" + $ref: ../date.yaml description: description: |- Most HIS source systems default the 'description' of an episode to the standard description for the provided ICPC, but allow the diff --git a/schemas/med_dossier/Feat.yaml b/schemas/med_dossier/Feat.yaml index 10163e4..858db73 100644 --- a/schemas/med_dossier/Feat.yaml +++ b/schemas/med_dossier/Feat.yaml @@ -18,9 +18,7 @@ properties: when: description: |- The stated feat was performed on this date. subscription style feats by convention always on the first day of a quarter. - format: date - type: string - example: "2023-02-28" + $ref: ../date.yaml invoice: description: |- If this feat has been declared, the invoice id that declared it. Not all source systems track this, and generally diff --git a/schemas/med_dossier/Journal.yaml b/schemas/med_dossier/Journal.yaml index b4fda23..0d37c9b 100644 --- a/schemas/med_dossier/Journal.yaml +++ b/schemas/med_dossier/Journal.yaml @@ -27,9 +27,7 @@ properties: when: description: |- The date when this journal text was typed and registered. - type: string - format: date - example: "2015-05-01" + $ref: ../date.yaml s: description: |- The journal text as typed by the practitioner for the 'S' field of SOAP (Subjective / Objective / Analysis / Plan). (Dutch: _S_ / _Subjectief_). diff --git a/schemas/med_dossier/Measurement.yaml b/schemas/med_dossier/Measurement.yaml index 3a85f27..c356b2a 100644 --- a/schemas/med_dossier/Measurement.yaml +++ b/schemas/med_dossier/Measurement.yaml @@ -39,9 +39,7 @@ properties: Date when this measurement was done. In practice it may instead represent the date when the measurement was registered which might be a day or two after the measurement was actually performed; not all source systems make it possible to distinguish the nature of the date. - type: string - format: date - example: "2023-04-30" + $ref: ../date.yaml value: description: |- The value of the measurement. Normalized and NHG compatible if possible. For example, enumerated values (such as for `DMHBKZ` which diff --git a/schemas/med_dossier/Medication.yaml b/schemas/med_dossier/Medication.yaml index a0e4305..207b511 100644 --- a/schemas/med_dossier/Medication.yaml +++ b/schemas/med_dossier/Medication.yaml @@ -18,9 +18,7 @@ properties: but was picked up by the patient. We advise coalescing `prescribed` and `delivered`, as this guarantees an actual date. - type: string - format: date - example: "2023-03-27" + $ref: ../date.yaml delivered: description: |- If present, the date when the patient received this medication (usually, because they picked it up at a pharmacy). Not all pharmacies are @@ -28,9 +26,7 @@ properties: entity that filled the prescription does not relay this to the source system. At least one of `prescribed` and `delivered` is guaranteed to have a value. - type: string - format: date - example: "2023-03-28" + $ref: ../date.yaml prescriber: $ref: "Practitioner.yaml" end: @@ -40,9 +36,7 @@ properties: If not present, this isn't the kind of medication that is designed to be used until symptoms fade or is no longer needed, or, our normalization systems aren't capable of normalizing the dosage/form into a meaningful end date. - type: string - format: date - example: "2023-04-14" + $ref: ../date.yaml description: description: |- This field is usually initialized with a general dutch name for the medication, but can be overwritten with custom text by the prescriber. diff --git a/schemas/pat-DOB.yaml b/schemas/pat-DOB.yaml index 7c19823..de4d86b 100644 --- a/schemas/pat-DOB.yaml +++ b/schemas/pat-DOB.yaml @@ -3,7 +3,5 @@ description: |- Note that by convention, patients whose birthdate is unknown (rare, but can happen in certain asylum seeker cases) pick a date and tend to pick either `xxxx-01-01` or `xxxx-07-01`. Can, in rare cases, be unavailable - if birth date is not known. -type: string -format: date -example: 1970-07-01 +$ref: ./date.yaml diff --git a/zoo-api.yaml b/zoo-api.yaml index a7ab0aa..01b7ee7 100644 --- a/zoo-api.yaml +++ b/zoo-api.yaml @@ -137,9 +137,7 @@ components: use this date as reference, and so forth). Defaults to today. schema: - type: string - format: date - example: '2024-04-01' + $ref: schemas/date.yaml CareGroup: name: group in: query