Skip to main content

Clinic Description Annotator for FHIR and SPARC

Project description

Clinical Description Annotator

Python3.9+ PyPI - Version

Annotator for annotating measurement results, workflows, workflow tools, models, and workflow tool process datasets in SPARC SDS datasets to the data format required for digitaltwins-on-fhir.

Usage

Annotator measurements for SPARC SDS dataset

  • Add measurement for one patient
from fhir_cda import Annotator
from fhir_cda.ehr import Measurement, ObservationValue, Quantity

annotator = Annotator("./dataset/dataset-sparc").measurements()

m = Measurement(
    value=ObservationValue(
        value_quantity=Quantity(
            value=30,
            unit="year",
            code="a")),
    code="30525-0")

annotator.add_measurements("sub-001", m).save()
  • Add measurements for one patient
m1 = Measurement(
    value=ObservationValue(
        value_quantity=Quantity(
            value=0.15,
            unit="cm",
            code="cm")),
    code="21889-1")
m2 = Measurement(
    value=ObservationValue(
        value_quantity=Quantity(
            value=0.15,
            unit="cm",
            code="cm",
            system="http://unitsofmeasure.org")),
    code="21889-1",
    code_system="http://loinc.org",
    display="Size Tumor")
annotator.add_measurements("sub-001", [m1, m2]).save()
  • Add measurement for multiple patients
m = Measurement(
    value=ObservationValue(value_string="Female"),
    code="99502-7",
    display="Recorded sex or gender",
    code_system="http://loinc.org")
annotator.add_measurements(["sub-001", "sub-002"], m).save()
  • A measurements for multiple patients
m1 = Measurement(
    value=ObservationValue(value_string="Female"),
    code="99502-7",
    display="Recorded sex or gender",
    code_system="http://loinc.org")
m2 = Measurement(
    value=ObservationValue(
        value_quantity=Quantity(
            value=0.15,
            unit="cm",
            code="cm",
            system="http://unitsofmeasure.org")),
    code="21889-1",
    code_system="http://loinc.org",
    display="Size Tumor")
annotator.add_measurements(["sub-001", "sub-002"], [m1, m2])
annotator.save()
  • Notice: The default value for unit system and code system are:
unit_system = "http://unitsofmeasure.org"
code_system = "http://loinc.org"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fhir_cda-1.0.6.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

fhir_cda-1.0.6-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file fhir_cda-1.0.6.tar.gz.

File metadata

  • Download URL: fhir_cda-1.0.6.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for fhir_cda-1.0.6.tar.gz
Algorithm Hash digest
SHA256 d54f63ed1465e0fc09e9e745d192c8afc820b79814c307f5b8d9025840cb742f
MD5 91bf6f91a5f067882dfabcce34983648
BLAKE2b-256 6bb9c35b6ba504d38e94a300a28fb16075fb5d02489da8e8b3628e25fb89f54b

See more details on using hashes here.

File details

Details for the file fhir_cda-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: fhir_cda-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for fhir_cda-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 51340253dd50a5d4f0150bcc9bbb76de2ff935c9c53f7dcf0ad8278eb19f49b0
MD5 fb3930eb2031497a213f5bf2428b0460
BLAKE2b-256 e97c6358042db499658f89fa70c2e30f4f7db8b001c4b739dfa997557e75fe69

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page