-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDA/FHIR connector components #83
Conversation
…n of BaseObject and base.py in modules
…to feature/cda-connector
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,20 @@ | |||
from healthchain.pipeline.components.base import Component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this class still be relevant with the Spacy, HuggingFace etc. transformers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should they inherit from Component
?
Description
Refactors CDA/FHIR parsing components as part of the pipeline instead of in the sandbox use case.
Related Issue
#63 #71
Changes Made
Connectors
modules to pipelines and removed parsing code fromcds
andclindoc
sandbox functions. This gives more visibility and explicitness to the step that converts request/response data to a pipeline container likeDocument
.add_input()
and.add_output()
toBasePipeline
and modified__call__
method to handle additional connector logic.add()
method to.add_node()
to make it more explicit and follow the convention of the connector add methodsBase
classes tobase.py
within the pipeline and component modules for uniformity and brevity when importing. i.e.from healthchain.pipeline.base import BasePipeline
__init__
tofhir_resources
module as need to importBundle
elsewherevalidate_and_convert_resources()
model validator toBundle
, which allowsBundle
to be initialised directly on a dictionary - allows dynamic import of resource type and recursively converts nested dictionaries to the appropriate Pydantic models e.g.Patient
CdsFhirData
such as.create()
, which initialises the model on a copy of the dictionary to avoiding modifying the original (this is due to theBundle
validation method potentially modifying the input dict)LLM
andSummarizationPipeline
and connectors toMedicalCodingPipeline
, which are works in progressTesting
Bundle
validator - @adamkells wanted to get your opinion that this is ok first.