Filters object contains all the Medical Service filters that are usable at a given location. It can be requested at the GET /v1/services/filters endpoint and used for filtering at the POST /v1/services/filters/apply endpoint. For documentation of the flow, see the Filter model definition page.
Value Set
Filters object is a map that contains Filter objects under its keys. The key identifies the filter itself.
Any filter key except name is, or might be optional in the future.
The keys are constructed from the FilterKey enum that contains the following items:
|
Value |
Description |
|---|---|
|
|
Key of the filter that filters the name of the Medical Service |
|
|
Key of the filter that filters the gender of the Service |
|
|
Key of the filter that filters the specializations of the Service |
|
|
Key of the filter that filters the opening hours of the service |
|
|
Key of the filter that filters the insurers supported by the service |
|
|
Key of the filter that filters the location of the service |
Type Definition
Under each key is a Filter object, that is extended in different implementations.
{
name: NameFilter
genders?: GenderFilter
specializations?: SpecializationFilter
openingHours?: OpeningHoursFilter
location?: LocationFilter
insurers?: InsurerFilter
}
The Filters object, that is returned by the GET /v1/services/filters endpoint can be used to create an interface where the user can set the required fields to filter Medical Services. The data from the interface should be sent the the POST /v1/services/filters/apply endpoint to get a list of matching Medical Services.
Example
The response of GET /v1/services/filters endpoint is a Filters object:
{
"name": {
"text": "Name",
"type": "TEXT"
},
"genders": {
"text": "Genders",
"type": "MULTISELECT",
"values": [
{
"value": "80e5d6f2-d486-45c7-8e3e-7e73e3dd0519",
"code": "FEMALE",
"text": "Female"
},
{
"value": "b23eb6b5-fc24-4a49-bf7d-ab695c8f04a1",
"code": "MALE",
"text": "Male"
}
]
},
"specializations": {
"type": "MULTISELECT",
"text": "Specializations",
"values": [
{
"text": "Pharmacy",
"value": "f68591e1-b5cd-45bb-aa75-9f8ff880d0e7",
"code": "PHARMACY"
},
{
"text": "Hospital",
"value": "f82a81ed-e186-4bc7-a19f-307acd5aaf83",
"code": "HOSPITAL"
},
{
"text": "Nephrology",
"value": "fa5255f0-5be1-4bbe-a86a-a0215146c314",
"code": "DOCTOR"
},
{
"text": "Medical performance physiology",
"value": "fc9b2fd1-257f-4cf0-abf5-8581bb24356a",
"code": "DOCTOR"
},
{
"text": "Internal Medicine and Pneumology",
"value": "fcad69cb-0b30-491b-b3f8-088b1723eaae",
"code": "DOCTOR"
}
],
"selectionLimit": 15
},
"openingHours": {
"text": "Opening Hours",
"type": "FILTER_LIST",
"filters": {
"mon": {
"type": "MULTISELECT",
"text": "Monday",
"shortText": "Mon",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"tue": {
"type": "MULTISELECT",
"text": "Tuesday",
"shortText": "Tue",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"wed": {
"type": "MULTISELECT",
"text": "Wednesday",
"shortText": "Wed",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"thu": {
"type": "MULTISELECT",
"text": "Thursday",
"shortText": "Thu",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"fri": {
"type": "MULTISELECT",
"text": "Friday",
"shortText": "Fri",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"sat": {
"type": "MULTISELECT",
"text": "Saturday",
"shortText": "Sat",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
},
"sun": {
"type": "MULTISELECT",
"text": "Sunday",
"shortText": "Sun",
"values": [
{
"value": "9f609b60-ab5a-42f9-8038-b1b8291f54db",
"code": "FORENOON",
"text": "Forenoon"
},
{
"value": "a806eb0f-8746-4b9c-a930-98e10efa7dfd",
"code": "AFTERNOON",
"text": "Afternoon"
}
]
}
}
},
"location": {
"text": "Location",
"type": "LOCATION"
}
}
See details of each filter in the Filter object documentation.