Skip to main content

Paediatric acute triage sign extraction schema for MESA

Project description

Paedacuteschema

Schema package for extracting acute triage signs ("red flags") from paediatric triage notes. Lightweight by design: a single flat AcuteSignType enum whose members are the canonical feature tokens consumed by downstream ML pipelines. Synonym/lay-phrasing guidance for matching lives in the prompt templates rather than the enum itself.

Structure

📁 paedacuteschema
├── examples/            # Training examples showing document input and structured output
├── schema.py            # Pydantic model for specifying expected output structure
├── prompt_builder.py    # Prompt builder for data generation and inference
├── prompt_datagen.txt   # Prompt template with example (for training data generation)
├── prompt_main.txt      # Prompt template without example (for inference/deployment)
└── py.typed             # Type checking marker

Usage

from paedacuteschema.prompt_builder import PromptBuilder

# Initialize builder
builder = PromptBuilder()

# Build data generation prompt (with example)
datagen_prompt = builder.build_datagen_prompt()

# Build main/inference prompt (without example)
main_prompt = builder.build_main_prompt()

Schema

Schema overview

Type Values
AcuteSignType tracheal_tug, chest_recession, nasal_flaring, grunting, head_bobbing, paradoxical_breathing, apnoea, audible_wheeze, stridor, pallor, mottling, peripheral_cyanosis, central_cyanosis, prolonged_capillary_refill, cold_peripheries, petechiae, purpura, blanching_rash, non_blanching_rash, jaundice, seizure, decorticate_posturing, decerebrate_posturing, opisthotonos, bulging_fontanelle, neck_stiffness, kernigs_sign, brudzinskis_sign, photophobia, phonophobia, drowsiness, reduced_consciousness, confusion, lethargy, floppiness, inability_to_stand_or_walk, high_pitched_cry, weak_cry, inconsolable_crying, absent_social_interaction, absent_social_smile, reduced_play, poor_feeding, unable_to_drink, reduced_urine_output, joint_swelling, joint_pain, limb_pain, refusal_to_weight_bear, parent_reports_not_themselves, clinician_documents_unwell
Assertion positive, negated, hypothetical, ambiguous

License

This project uses a proprietary license issued by Guy's and St Thomas' NHS Foundation Trust, enabling free (non-commercial) use by NHS organisations. See LICENSE files for details.

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

londonaicentre_paedacuteschema-1.2.0.tar.gz (20.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

londonaicentre_paedacuteschema-1.2.0-py3-none-any.whl (23.2 kB view details)

Uploaded Python 3

File details

Details for the file londonaicentre_paedacuteschema-1.2.0.tar.gz.

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.2.0.tar.gz
  • Upload date:
  • Size: 20.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for londonaicentre_paedacuteschema-1.2.0.tar.gz
Algorithm Hash digest
SHA256 e904734fc5e427a7a86b91c2554ffefee1ad2e9474a303a4fe6df5fb5e7ab2db
MD5 16b19c5cf03cb9be205ca81a705c673e
BLAKE2b-256 1f67a0926b6aadc8f30ef655092a60732dd814e06ed39052fe9275fc0447c388

See more details on using hashes here.

File details

Details for the file londonaicentre_paedacuteschema-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Amazon Linux","version":"2023","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for londonaicentre_paedacuteschema-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 adc135560d963b871ab15e6cc75129916c429a2f1303313dd393b7a9122c255c
MD5 e722d927b0611b363e088b52d0e23077
BLAKE2b-256 745ff447ed3002d16f8d0e2f0cd84318524910e6a2ae8504db7543339a4a34bf

See more details on using hashes here.

Supported by

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