Pull clinical records out of HL7v2 and FHIR using Python

Get skill on GitHubRaw SKILL.md on GitHub

Opens the skill on GitHub

Source AWS Labs (@awslabs) — awslabs/hcls-agent-skills

Installnpx skills add awslabs/hcls-agent-skills --skill ehr-data-parsing

Submit a skill

Overview

AWS's ehr-data-parsing skill gives Python code for pulling clinical data out of two healthcare formats, HL7v2 and FHIR R4. It covers patients' details, lab results, diagnoses and medicines, converting HL7v2 batches into CSV or pandas tables and flattening FHIR bundles. It also includes data quality checks and a conceptual mapping from HL7v2 to FHIR, using the python-hl7 and fhir.resources libraries. HL7v3, CDA, FHIR servers and SMART on FHIR sign-in are out of scope. Use synthetic or de-identified data when you try it.

Use cases

Alternatives

  • Work up a denied medical claim and draft the appealAWS's provider-denial-workup skill helps healthcare revenue-cycle teams handle a denied claim. It checks the inputs, classifies the denial from its CARC and RARC codes, decides whether to appeal, pend or accept, checks appeal deadlines, drafts a letter to the payer and lists the supporting documents needed. Missing facts are marked for a reviewer instead of being invented, and the draft is never submitted without a person's approval. It names cases to hand to a human expert, such as experimental-treatment or legal-exposure denials.HealthcareAWSHealthcare
  • Convert, read and de-identify DICOM and NIfTI medical imagesAn AWS Labs skill for working with medical image files. It gives an agent ready commands and Python for turning DICOM series into NIfTI with dcm2niix, reading headers and pixels with pydicom, stripping patient details and private tags, loading NIfTI volumes with nibabel and arranging data in the BIDS folder layout. It also covers batch work grouped by series and a decision guide for choosing a de-identification approach. Its de-identification code is a starting point: check the results against your compliance rules, including any text burned into the images, before sharing them.HealthcareDICOMHealthcare
  • Build FHIR API endpointsThis skill is a reference for building healthcare REST endpoints on FHIR R4, such as Patient, Observation, Encounter, and MedicationRequest. It covers mandatory fields, allowed enum values, HTTP responses and errors, and coding systems like LOINC, SNOMED, RxNorm, and ICD-10. SMART on FHIR authorization, Bundles, transactions, and paged search are included.HealthcareFHIRInteroperability
  • De-identify clinical data with a local script before AI analysisThis skill from Aperivue's medical research collection guides a researcher through removing protected health information from CSV, TSV or Excel files before any AI-assisted analysis. The removal itself happens in a Python script on the researcher's computer that never goes online or calls a model, using patterns for 12 countries and an interactive review in the researcher's own terminal. The agent explains and checks the process but is told never to ask for raw patient data or to read the mapping file of original values. It covers assessment, scanning, review, de-identification and verification, with references for the HIPAA Safe Harbor list and date shifting. Never paste or upload raw patient data to the agent, and check the output before sharing it, since a pattern-based tool can miss identifiers.HealthcareHealthcare dataPrivacy
  • Parse, profile and check healthcare claims data for billing anomaliesAn AWS Labs skill that gives an agent copy-ready Python and SQL for healthcare claims data. It parses X12 837 and 835 files into tables, profiles providers' evaluation and management coding against peers, flags outliers and impossible days, checks NCCI code-pair edits, finds duplicate claims and runs a Benford's law test on charges. It is aimed at analysts building claims pipelines or reviewing billing patterns. An outlier it flags is a lead to review, not proof of fraud.HealthcareHealthcare claimsAnalytics
  • Abstract clinical notes into cited data fieldsThis skill extracts the fields you define from clinical notes and ties each value to the exact text it came from. Missing values stay empty instead of being guessed. Output can feed chart abstraction, a patient registry, or a research cohort, and it can be exported as FHIR.HealthcareClinical NotesData Extraction

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall