Guideline Interface
Guideline Interface - FastAPI interface |
FastAPI app
Guideline Interface - FastAPI interface
- exception GuidelineServerLoginException[source]
Bases:
GuidelineExceptionGuideline server login exception
- exception RecommendationNotFoundException[source]
Bases:
GuidelineExceptionGuideline not found exception
- class Settings(_env_file='<object object>', _env_file_encoding=None, _env_nested_delimiter=None, _secrets_dir=None, **values)[source]
Bases:
BaseSettingsFastAPI Settings for guideline interface
-
ceosys_base_path:
str
-
magicapp_email:
str
-
magicapp_password:
str
-
magicapp_server:
str
-
magicapp_use:
bool
-
ceosys_base_path:
- get_file_list(path, pattern)[source]
Returns all files in a paths that match a pattern.
- Parameters:
path (
Union[str,Path]) – Search pathpattern (
str) – File name pattern
- Return type:
List[str]
Returns: List of all files that match the pattern.
- get_guideline_recommendation(recommendation_id)[source]
Retrieve a guideline recommendation by its identifier.
Guidelines recommendations are fetched from the MAGICapp server and as a fallback option from local storage.
- Parameters:
recommendation_id (
int) – Guideline recommendation identifier- Return type:
Dict
Returns: Guideline recommendation in FHIR format
- get_guideline_recommendation_from_file(recommendation_id)[source]
Retrieve a guideline recommendation from local storage by its identifier
- Parameters:
recommendation_id (
int) – Guideline recommendation identifier- Return type:
Dict
Returns: Guideline recommendation in FHIR format
- get_guideline_recommendation_from_magicapp(recommendation_id)[source]
Retrieve a guideline recommendation from MAGICapp server (https://app.magicapp.org/) by its identifier.
For the time being, guideline recommendations are saved in the “rational” field of the MAGICapp interface, as currently no specific field for machine-readable versions of the guidelines exists in MAGICapp.
- Parameters:
recommendation_id (
int) – Guideline recommendation identifier- Return type:
Dict
Returns: Guideline recommendation in FHIR format
- async list_guidelines()[source]
Get a list of available guideline recommendations.
Returns: List of available guideline recommendations
- Return type:
List[Dict]