Skip to main content

Oncoradschema

Schema package for oncology extraction from radiology reports.

Structure

📁 oncoradschema
├── 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 oncoradschema.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
ScanModality ct, mri, pet, pet_ct, pet_mri, spect, spect_ct, scintigraphy, ultrasound, xray, fluoroscopy, mammography, tomosynthesis, other
ScanContrast without_contrast, with_contrast, dual_phase, triple_phase
ScanRegion head, neck, chest, abdomen, pelvis, spine, upper_limb, lower_limb, whole_body, heart, breast, axilla, vessel, other
ScanRationale routine_screening, diagnostic_pre_treatment, treatment_planning, follow_up, interventional, not_determinable
ComparativeChange new, progressive, stable, improving, resolved, mixed, indeterminate
FormalRECISTResponse complete_response, partial_response, stable_disease, progressive_disease, not_evaluable, not_applicable
ScoringSystem other, tnm, ajcc_stage, rcr, bi_rads, acr_breast_density, pi_rads, bosniak, li_rads, lung_rads, ti_rads, o_rads, deauville, gleason
Laterality left, right, bilateral, not_applicable
AnatomicalSite other, unknown, lung, pleura, mediastinum, heart, chest_wall, liver, pancreas, spleen, gallbladder, bile_duct, kidney, adrenal, oesophagus, stomach, small_intestine, colon, rectum, anus, peritoneum, omentum, mesentery, retroperitoneum, bladder, prostate, testis, ovary, uterus, cervix, breast, brain, meninges, spinal_cord, oral_cavity, pharynx, larynx, salivary_gland, nasal_cavity, paranasal_sinus, thyroid, bone_skull, bone_spine, bone_ribs_sternum, bone_pelvis, bone_upper_limb, bone_lower_limb, soft_tissue_head_neck, soft_tissue_thorax, soft_tissue_abdomen, soft_tissue_pelvis, soft_tissue_upper_limb, soft_tissue_lower_limb, lymph_node_cervical, lymph_node_supraclavicular, lymph_node_axillary, lymph_node_internal_mammary, lymph_node_mediastinal, lymph_node_hilar, lymph_node_abdominal, lymph_node_retroperitoneal, lymph_node_pelvic, lymph_node_inguinal, vessel_aorta, vessel_ivc, vessel_svc, vessel_portal_vein, vessel_hepatic_vein, vessel_hepatic_artery, vessel_sma, vessel_smv, vessel_splenic_vein, vessel_renal_vein, vessel_renal_artery, vessel_pulmonary_artery, vessel_carotid, vessel_iliac, vessel_other
LesionStatus cancerous, uncertain
LesionNature primary, metastasis, not_stated_unclear
LesionMorphology solid, cystic, mixed_solid_cystic, ground_glass_nodule, part_solid_ground_glass, non_mass_enhancement
LesionInternalFeature necrotic, calcified, haemorrhagic, mucinous, fat_containing, sclerotic, lytic
LesionMargin circumscribed_welldefined, microlobulated, obscured, indistinct_illdefined, spiculated, irregular, lobulated
LesionShape oval, round, irregular, lobulated
LesionUptake avid, non_avid, equivocal
NonCancerFindingType other, thrombus, aneurysm, dissection, stenosis_occlusion, ascites, effusion, active_haemorrhage, haematoma, abscess_pus_collection, cyst_benign_collection, pneumothorax_pneumoperitoneum, inflammation_infection, obstruction_dilatation, calculus, fibrosis_scarring, steatosis_fatty_change, atrophy, volume_loss_collapse, fracture, perforation_rupture, herniation, degenerative_change

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.

Metadata

Release files for londonaicentre-oncoradschema 0.6.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for londonaicentre-oncoradschema 0.6.5
File Size Uploaded Provenance Actions
londonaicentre_oncoradschema-0.6.5.tar.gz 27.6 kB Without provenance Details for londonaicentre_oncoradschema-0.6.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for londonaicentre-oncoradschema 0.6.5
File Interpreter ABI Platform Actions
londonaicentre_oncoradschema-0.6.5-py3-none-any.whl Python 3 none any Details for londonaicentre_oncoradschema-0.6.5-py3-none-any.whl

Total release size: 58.4 kB

Release files / londonaicentre_oncoradschema-0.6.5.tar.gz

Download URL londonaicentre_oncoradschema-0.6.5.tar.gz
Size 27.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7cee5cdb8cf68bf167e334e05816cce9a4eb1457c8df0e7550d106bf9cfe225b
BLAKE2b-256 checksum
How to use checksums
8be05a99abba6d0ddc10ce78172ae60ea6413ecca21ee4d1aaf56312e3d97c68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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}

Release files / londonaicentre_oncoradschema-0.6.5-py3-none-any.whl

Download URL londonaicentre_oncoradschema-0.6.5-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
debcdce3f62746721473c375cd1e0c56ad17e9e395829e129c0aabb6214c1bae
BLAKE2b-256 checksum
How to use checksums
c5997b8ec53c9c5357c78bdc3b2d64771f1185fe9c6ab643cece0937c7dc7cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","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}

Security for londonaicentre-oncoradschema 0.6.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page