GenderFilter extends FilterBase
GenderFilter is a filter type that can be used to filter Medical Services by gender.
GenderFilter type describes a multiselect input, where user can select the searched genders. Its values are of type GenderFilterValue.
|
Property name |
Property type |
Property description |
|---|---|---|
|
|
string |
Localised text of the Filter |
|
|
FilterType = ‘MULTISELECT’ |
Type of the Filter |
|
|
Values to select the gender(s) from |
Example response
An example of a GenderFilter retrieved from GET /v1/services/filters endpoint looks like this:
{
"genders": {
"text": "Genders",
"type": "MULTISELECT",
"values": [
{
"value": "80e5d6f2-d486-45c7-8e3e-7e73e3dd0519",
"text": "Female",
"code": "FEMALE"
},
{
"value": "b23eb6b5-fc24-4a49-bf7d-ab695c8f04a1",
"text": "Male",
"code": "MALE"
}
]
}
}
Example request
After the filter was rendered, filled and submitted by the user, its value should be sent to POST /v1/services/filters/apply endpoint.
Location filter is always mandatory
The request body would look like this:
{
"genders": [
"80e5d6f2-d486-45c7-8e3e-7e73e3dd0519"
],
"location": {
"latitude": 48.218323,
"longitude": 16.324020
}
}
The gender value sent is the value of gender Female in the response above.
This will return the Medical Services that are of gender Female, restricted by the endpoint’s limits.