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.1.0.tar.gz (20.4 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.1.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.1.0.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.1.0.tar.gz
Algorithm Hash digest
SHA256 d958c4a4bce6c1d916fe6fff26b6cb6505167ed0ed8b727454413ff14fbf7742
MD5 af483764ef68ecd7be0f61761c13b79d
BLAKE2b-256 9bf82742f07e3024503e0a16e555888ee30112b44d42d93b665532ffa3f61fa2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78b44648625909391bba93e734b7d83465ebaa903b52f2931272736836376d81
MD5 5ce1f626cc09c52838ccc22d629746dd
BLAKE2b-256 7a04816e9dc5876d7a91b64f45e12728174db52162ae64c45c0c26117c6f8aac

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