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

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.0.0.tar.gz (20.3 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.0.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.0.0.tar.gz
  • Upload date:
  • Size: 20.3 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.0.0.tar.gz
Algorithm Hash digest
SHA256 491edccd346446aba6d0ba037b2a23f67cf570addd3cd74a50f40db4fd8dcb92
MD5 56a67f79239dd10ba7d10f4168efaa11
BLAKE2b-256 09f225b0fb60f98f5117d201f2f109b9fedc6f5214e77e32148aa22a4ee71028

See more details on using hashes here.

File details

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

File metadata

  • Download URL: londonaicentre_paedacuteschema-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bf6c9f5ba9dc1d69024d62642aba27d78203c79f8946f8436d4458519b07163
MD5 51bbb08f547c193749191da39730d2ea
BLAKE2b-256 5d890e74f5723733198ffdc1aeda0a07cdc005735110a0c992fc6e50ec3f0ded

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