Api reference
components.hp_dataset.public.api ¶
components.hp_dataset.public.controllers ¶
search ¶
HpDatasetPublicSearchEndpoint ¶
Bases: BaseController
Main controller for public search
post ¶
Search for entities based on filters
Expects a JSON body with SearchRequest structure: { "country": "france", "filters": [...], "text": "optional search text", "text_op": "stemmed", "geolocation": {lat: 48.85, lon: 2.35, radius: 1000}, "geolocation_op": "geo_within_radius", "limit": 10, "offset": 0 }
Source code in components/hp_dataset/public/controllers/search.py
components.hp_dataset.public.entities ¶
Organization
dataclass
¶
Organization(
id,
country,
displayable_name,
identifiers,
properties,
total_roles=0,
roles=None,
parent_organization=None,
children_organizations=list(),
)
Bases: DataClassJsonMixin
Represents an Organization — a legal entity — in the HP Dataset
children_organizations
class-attribute
instance-attribute
¶
Practitioner
dataclass
¶
Bases: DataClassJsonMixin
Represents a Practitioner — an actual human being in the health system — in the HP Dataset
PractitionerRole
dataclass
¶
PractitionerRole(
id,
country,
displayable_name,
organization,
practitioner,
identifiers,
properties,
)
Bases: DataClassJsonMixin
Represents a PractitionerRole — a link between a Practitioner and an Organization — in the HP Dataset
Property
dataclass
¶
Bases: DataClassJsonMixin
Represents a Property — a value any Practitioner, PractitionerRole or Organization can hold — in the HP Dataset
components.hp_dataset.public.enums ¶
Country ¶
DefinitionValueType ¶
Bases: AlanBaseEnum
Lists all possible types of values we can have for a property.
The value_type is understood as an index or generic type, complementing the schema itself that validates the actual content and format of the value.
EntityType ¶
Bases: AlanBaseEnum
Lists all possible entities that a property can be linked to
SearchIntent ¶
Bases: AlanBaseEnum
Lists different intents on the usage of the API
- search: standard intent, we want to search for full entities
- autocomplete: we want a really fast autocomplete flavour, nothing more
SearchMode ¶
Bases: AlanBaseEnum
Lists all possible ways we can retrieve results from an API search
- full: will return the whole entity with its properties
- id_and_name: will only return the id and the displayable name, which is faster since it'll directly come from the actual indexes we're searching in, not from a separate query.