Question: from ._base import DataFrameFromJSONMixin import pandas as pd def get_patientid(subject): ''' Helper function to get a paitent id from a fhir reference string. ''' split_string
from ._base import DataFrameFromJSONMixin import pandas as pd def get_patientid(subject): ''' Helper function to get a paitent id from a fhir reference string. ''' split_string = subject['reference'].split('/') return split_string[-1] class Label(DataFrameFromJSONMixin): def __init__(self, path, patient_path): super().__init__(path) self.patient_df = pd.read_json(patient_path, lines = True)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
