fhiry package¶
Submodules¶
fhiry.base_fhiry module¶
Copyright (c) 2020 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT
- class fhiry.base_fhiry.BaseFhiry(config_json=None)[source]¶
Bases:
object
- add_patient_id()[source]¶
Create a patientId column with the resource.id if a Patient resource or with the resource.subject.reference if other resource type
- property delete_col_raw_coding¶
- property df¶
- drop_empty_cols()[source]¶
Drop columns that are completely empty (all NaN values) from the dataframe.
- llm_query(query, llm, embed_model=None, verbose=True)[source]¶
Execute a query using llama_index
- Parameters:
- Raises:
- Returns:
Results of the query
- Return type:
Any
- remove_string_from_columns(string_to_remove='resource.')[source]¶
Removes a string from all column names in a Pandas DataFrame.
- Parameters:
df (pd.DataFrame) – The input DataFrame.
string_to_remove (str) – The string to remove from column names.
- Returns:
A new DataFrame with modified column names.
- Return type:
pd.DataFrame
fhiry.bqsearch module¶
Copyright (c) 2023 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT
fhiry.fhirndjson module¶
Copyright (c) 2020 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT
fhiry.fhirsearch module¶
fhiry.fhiry module¶
Copyright (c) 2020 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT
fhiry.flattenfhir module¶
Copyright (c) 2024 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT
- class fhiry.flattenfhir.FlattenFhir(fhirobject={}, config_json=None)[source]¶
Bases:
ABC
- property fhirobject¶
- flatten_allergyintolerance(allergyintolerance) str [source]¶
Flatten the allergyintolerance object into a string representation.
- Parameters:
allergyintolerance (AllergyIntolerance) – The allergyintolerance object to be flattened.
- Returns:
The flattened string representation of the allergyintolerance object.
- Return type:
- flatten_condition(condition) str [source]¶
Flatten the condition object into a string representation.
- Parameters:
condition (Condition) – The condition object to be flattened.
- Returns:
The flattened string representation of the condition object.
- Return type:
- flatten_documentreference(documentreference) str [source]¶
Flatten the documentreference object into a string representation.
- Parameters:
documentreference (DocumentReference) – The documentreference object to be flattened.
- Returns:
The flattened string representation of the documentreference object.
- Return type:
- flatten_medication(medication) str [source]¶
Flatten the medication object into a string representation.
- Parameters:
medication (Medication) – The medication object to be flattened.
- Returns:
The flattened string representation of the medication object.
- Return type:
- flatten_observation(observation) str [source]¶
Flatten the observation object into a string representation.
- Parameters:
observation (Observation) – The observation object to be flattened.
- Returns:
The flattened string representation of the observation object.
- Return type:
- flatten_patient(patient) str [source]¶
Flatten the patient object into a string representation.
- Parameters:
patient (Patient) – The patient object to be flattened.
- Returns:
The flattened string representation of the patient object.
- Return type:
- flatten_procedure(procedure) str [source]¶
Flatten the procedure object into a string representation.
- Parameters:
procedure (Procedure) – The procedure object to be flattened.
- Returns:
The flattened string representation of the procedure object.
- Return type:
- property flattened¶
fhiry.main module¶
Copyright (c) 2025 Bell Eapen
This software is released under the MIT License. https://opensource.org/licenses/MIT