fhirpack package¶
Subpackages¶
- fhirpack.custom package
- fhirpack.extraction package
- Submodules
- fhirpack.extraction.base module
- fhirpack.extraction.base_test module
- fhirpack.extraction.condition module
- fhirpack.extraction.condition_test module
- fhirpack.extraction.diagnosticreport module
- fhirpack.extraction.endpoint module
- fhirpack.extraction.episodeofcare module
- fhirpack.extraction.familymemberhistory module
- fhirpack.extraction.imagingstudy module
- fhirpack.extraction.list module
- fhirpack.extraction.medicationadministration module
- fhirpack.extraction.medicationrequest module
- fhirpack.extraction.observation module
- fhirpack.extraction.patient module
- fhirpack.extraction.patient_test module
- fhirpack.extraction.sample module
- Module contents
- fhirpack.load package
- fhirpack.transformation package
Submodules¶
fhirpack.auth module¶
- class fhirpack.auth.Auth[source]¶
Bases:
object
- __dict__ = mappingproxy({'__module__': 'fhirpack.auth', 'getToken': <staticmethod object>, 'tokenViaPasswordGrant': <staticmethod object>, 'oAuthTokenFromJWT': <staticmethod object>, 'parseSHIPTokenEndpointResponse': <staticmethod object>, '__dict__': <attribute '__dict__' of 'Auth' objects>, '__weakref__': <attribute '__weakref__' of 'Auth' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'fhirpack.auth'¶
- __weakref__¶
list of weak references to the object (if defined)
fhirpack.base module¶
- class fhirpack.base.BaseMixin[source]¶
Bases:
object
- __dict__ = mappingproxy({'__module__': 'fhirpack.base', 'guessOutputResourceType': <function BaseMixin.guessOutputResourceType>, 'prepareCompositeOutput': <function BaseMixin.prepareCompositeOutput>, 'prepareOutput': <function BaseMixin.prepareOutput>, 'parseReference': <function BaseMixin.parseReference>, 'prepareReferences': <function BaseMixin.prepareReferences>, 'prepareOperationInput': <function BaseMixin.prepareOperationInput>, 'castOperand': <function BaseMixin.castOperand>, 'referencesToIds': <function BaseMixin.referencesToIds>, 'referencesToResources': <function BaseMixin.referencesToResources>, 'prepareInput': <function BaseMixin.prepareInput>, 'isFrame': <property object>, '__dict__': <attribute '__dict__' of 'BaseMixin' objects>, '__weakref__': <attribute '__weakref__' of 'BaseMixin' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'fhirpack.base'¶
- __weakref__¶
list of weak references to the object (if defined)
- property isFrame¶
- class fhirpack.base.Frame(*args, **kwargs)[source]¶
Bases:
DataFrame
,BaseMixin
,ExtractorMixin
,TransformerMixin
,LoaderMixin
,PluginMixin
- __doc__ = None¶
- __module__ = 'fhirpack.base'¶
- property _constructor¶
Used when a manipulation result has the same dimensions as the original.
- property _constructor_expanddim¶
- _mgr: BlockManager | ArrayManager¶
- explode(*args, **kwargs)[source]¶
Transform each element of a list-like to a row, replicating index values.
New in version 0.25.0.
- Parameters:
column (IndexLabel) –
Column(s) to explode. For multiple columns, specify a non-empty list with each element be str or tuple, and all specified columns their list-like data on same row of the frame must have matching length.
New in version 1.3.0: Multi-column explode
ignore_index (bool, default False) –
If True, the resulting index will be labeled 0, 1, …, n - 1.
New in version 1.1.0.
- Returns:
Exploded lists to rows of the subset columns; index will be duplicated for these rows.
- Return type:
DataFrame
- Raises:
ValueError : –
If columns of the frame are not unique. * If specified columns to explode is empty list. * If specified columns to explode have not matching count of elements rowwise in the frame.
See also
DataFrame.unstack
Pivot a level of the (necessarily hierarchical) index labels.
DataFrame.melt
Unpivot a DataFrame from wide format to long format.
Series.explode
Explode a DataFrame from list-like columns to long format.
Notes
This routine will explode list-likes including lists, tuples, sets, Series, and np.ndarray. The result dtype of the subset rows will be object. Scalars will be returned unchanged, and empty list-likes will result in a np.nan for that row. In addition, the ordering of rows in the output will be non-deterministic when exploding sets.
Reference the user guide for more examples.
Examples
>>> df = pd.DataFrame({'A': [[0, 1, 2], 'foo', [], [3, 4]], ... 'B': 1, ... 'C': [['a', 'b', 'c'], np.nan, [], ['d', 'e']]}) >>> df A B C 0 [0, 1, 2] 1 [a, b, c] 1 foo 1 NaN 2 [] 1 [] 3 [3, 4] 1 [d, e]
Single-column explode.
>>> df.explode('A') A B C 0 0 1 [a, b, c] 0 1 1 [a, b, c] 0 2 1 [a, b, c] 1 foo 1 NaN 2 NaN 1 [] 3 3 1 [d, e] 3 4 1 [d, e]
Multi-column explode.
>>> df.explode(list('AC')) A B C 0 0 1 a 0 1 1 b 0 2 1 c 1 foo 1 NaN 2 NaN 1 NaN 3 3 1 d 3 4 1 e
- property getResourceType¶
- property keys¶
Get the ‘info axis’ (see Indexing for more).
This is index for Series, columns for DataFrame.
- Returns:
Info axis.
- Return type:
Index
- property pretty¶
fhirpack.base_test module¶
fhirpack.cli module¶
fhirpack.cli_test module¶
fhirpack.config module¶
- class fhirpack.config.Config[source]¶
Bases:
object
- __CONFIG = {}¶
- __DOTENVPATH = None¶
- __configLogger()¶
- __dict__ = mappingproxy({'__module__': 'fhirpack.config', '_Config__CONFIG': {}, '_Config__DOTENVPATH': None, '__init__': <function Config.__init__>, 'loadConfig': <function Config.loadConfig>, 'globalExceptionHandler': <function Config.globalExceptionHandler>, 'data': <property object>, '_Config__configLogger': <staticmethod object>, 'set': <function Config.set>, 'get': <function Config.get>, 'getLogger': <function Config.getLogger>, '__dict__': <attribute '__dict__' of 'Config' objects>, '__weakref__': <attribute '__weakref__' of 'Config' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'fhirpack.config'¶
- __weakref__¶
list of weak references to the object (if defined)
- property data¶
fhirpack.config_test module¶
fhirpack.conftest module¶
fhirpack.constants module¶
fhirpack.exceptions module¶
- exception fhirpack.exceptions.BaseError[source]¶
Bases:
Exception
- __doc__ = None¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
- class fhirpack.exceptions.ErrorSeverity(value)[source]¶
Bases:
Enum
An enumeration.
- __doc__ = 'An enumeration.'¶
- __module__ = 'fhirpack.exceptions'¶
- error = 'error'¶
- fatal = 'fatal'¶
- information = 'information'¶
- warning = 'warning'¶
- class fhirpack.exceptions.InvalidConfigurationException[source]¶
Bases:
object
- __dict__ = mappingproxy({'__module__': 'fhirpack.exceptions', '__dict__': <attribute '__dict__' of 'InvalidConfigurationException' objects>, '__weakref__': <attribute '__weakref__' of 'InvalidConfigurationException' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
- exception fhirpack.exceptions.InvalidInputDataException[source]¶
Bases:
ValueError
Raised when invalid input types are passed.
- __doc__ = 'Raised when invalid input types are passed.'¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
- class fhirpack.exceptions.InvalidOperationException[source]¶
Bases:
object
Raised when operation is invalid for data.
- __dict__ = mappingproxy({'__module__': 'fhirpack.exceptions', '__doc__': 'Raised when operation is invalid for data.', '__dict__': <attribute '__dict__' of 'InvalidOperationException' objects>, '__weakref__': <attribute '__weakref__' of 'InvalidOperationException' objects>, '__annotations__': {}})¶
- __doc__ = 'Raised when operation is invalid for data.'¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
- exception fhirpack.exceptions.InvalidSearchParams[source]¶
Bases:
ValueError
Raised when invalid key is used for searchParams
- __doc__ = 'Raised when invalid key is used for searchParams'¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
- exception fhirpack.exceptions.SampleError[source]¶
Bases:
BaseError
- __doc__ = None¶
- __module__ = 'fhirpack.exceptions'¶
- exception fhirpack.exceptions.ServerConnectionException[source]¶
Bases:
ConnectionError
Raised when pack does not have connection to server.
- __doc__ = 'Raised when pack does not have connection to server.'¶
- __module__ = 'fhirpack.exceptions'¶
- __weakref__¶
list of weak references to the object (if defined)
fhirpack.pack module¶
- class fhirpack.pack.PACK(apiBase=None, client=None, envFile=None, unconnected=False, authMethod=None, authParams=None)[source]¶
Bases:
BaseMixin
,ExtractorMixin
,TransformerMixin
,LoaderMixin
,PluginMixin
- __doc__ = None¶
- __init__(apiBase=None, client=None, envFile=None, unconnected=False, authMethod=None, authParams=None)[source]¶
- __module__ = 'fhirpack.pack'¶
- __setupClient(apiBase=None, authMethod=None, authParams=None)¶