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

Beta version #1

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Beta version #1

wants to merge 26 commits into from

Conversation

linartova
Copy link

Hi,
this is my first draw, maybe I will change it soon and add commits.

Copy link
Member

@RadovanTomik RadovanTomik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See individual comments for specific tips. Generally separate the script into more files, improve readability, add unit tests, add instructions for running it localy.

import xml.etree.ElementTree as ElementTree


class Patient:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the data model classes into separate files

create_specimen(patient.identifier, specimen, number)


def create_patient(patient, number):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use smart-on-fhir: https://github.com/smart-on-fhir/client-py for creating the FHIR Resources.


tree = ElementTree.ElementTree(root)
xml_file_path = "patient_" + number + ".fhir.xml"
tree.write(xml_file_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the FHIR validator for validating the resources: https://hl7.org/fhir/validator/

from datetime import datetime, timedelta


class Patient:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated code

'password': '',
}

cdm_schema = ["""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where did you get the schema from?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants