Skip to content
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

Add data loaders utility function for sandbox #72

Open
jenniferjiangkells opened this issue Oct 4, 2024 · 0 comments
Open

Add data loaders utility function for sandbox #72

jenniferjiangkells opened this issue Oct 4, 2024 · 0 comments
Labels
Component: Sandbox Issue/PRs that deal with the client and server components of the sandbox Issue: Feature Request ✨ New feature or improvement to existing feature

Comments

@jenniferjiangkells
Copy link
Member

Description

Currently if the user doesn't use DataGenerator, you end up with something like:

    @hc.ehr(workflow="sign-note-inpatient")
    def load_data_in_client(self) -> CcdData:
        with open("/path/to/cda/data.xml", "r") as file:
            xml_string = file.read()

        return CcdData(cda_xml=xml_string)

It would be nice to abstract this away into a utility function so it will look something more like:

    from healthchain.loaders.ccdloader import CcdLoader

    @hc.ehr(workflow="sign-note-inpatient")
    def load_data_in_client(self) -> CcdData:
        cda_test_data = CcdLoader('path/to/directory/of/cda/xmls')
        
        return cda_test_data
  • some configs on the order to pick files (random, in order)

Context

just less faff innit

@jenniferjiangkells jenniferjiangkells added Component: Sandbox Issue/PRs that deal with the client and server components of the sandbox Issue: Feature Request ✨ New feature or improvement to existing feature labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Sandbox Issue/PRs that deal with the client and server components of the sandbox Issue: Feature Request ✨ New feature or improvement to existing feature
Projects
Status: Todo
Development

No branches or pull requests

1 participant