协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
lab-result-interpreter【开发与工程】Retrieves, organizes, and interprets laboratory Observation resources with clinical context. Use when user asks to "interpret labs", "review lab results", "what do these labs mean", "explain my bloodwork", "check labs", "lab trends", "abnormal labs", or needs clinical interpretation of laboratory values. Do NOT use for vital signs, imaging results, p…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Pull laboratory Observation resources for a patient. Organize by panel type (CBC, BMP, CMP, liver, lipids, thyroid, coagulation, urinalysis). Flag abnormal values using the interpretation field and referenceRange. Calculate delta checks against prior results to detect clinically significant changes. Identify critical values requiring immediate action. Correlate abnormal patterns with differential diagnoses. Present results in structured clinical format with trend analysis.
| Resource | Purpose | Key Fields |
|---|---|---|
| Observation | Lab results | code, valueQuantity, interpretation, referenceRange, effectiveDateTime, status, component |
| Condition | Clinical correlation | code, clinicalStatus, onsetDateTime |
| MedicationStatement | Drug-lab correlation | medicationCodeableConcept, status, effectivePeriod |
| Patient | Age/sex for reference ranges | birthDate, gender |
Tool: fhir_read
resourceType: "Patient"
id: "[patient-id]"
Extract birthDate (calculate age) and gender. These determine reference range selection -- many analytes have age- and sex-specific ranges.
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&category=laboratory&date=ge[target-date]&_sort=-date&_count=200"
If user requests a specific panel, narrow with LOINC codes:
code=58410-2code=51990-0code=24323-8code=24325-3code=57698-3code=3016-3,3026-2,3024-7Default date range: ge[30-days-ago] unless user specifies otherwise.
Group Observations by code.coding LOINC into:
For each Observation:
interpretation.coding.code:
H = High, L = Low, HH = Critical High, LL = Critical Low, A = AbnormalvalueQuantity.value against referenceRange[0].low.value and referenceRange[0].high.value[CRITICAL] tag and include recommended immediate actionFor each abnormal result, pull the prior value:
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&code=[loinc-code]&_sort=-date&_count=5"
Calculate:
Flag significant deltas:
Cross-reference abnormal values to detect clinical patterns:
See references/lab-patterns.md for comprehensive pattern list.
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&clinical-status=active"
Tool: fhir_search
resourceType: "MedicationStatement"
queryParams: "patient=[patient-id]&status=active"
Common drug-lab interactions to check:
LAB RESULTS INTERPRETATION -- [Patient Name] -- [Date Range]
=============================================================
CBC (collected [date])
WBC: 8.2 x10^3/uL [4.5-11.0] NORMAL
Hemoglobin: 9.1 g/dL [12.0-16.0] LOW [was 11.2 on MM/DD, delta -2.1]
Hematocrit: 27.3% [36.0-46.0] LOW
Platelets: 145 x10^3/uL [150-400] LOW (borderline)
MCV: 72 fL [80-100] LOW
PATTERN: Microcytic anemia with dropping hemoglobin
- Iron studies recommended to evaluate for iron deficiency
- Delta check: Hgb dropped 2.1 g/dL -- clinically significant
BMP (collected [date])
Potassium: 6.1 mEq/L [3.5-5.0] [CRITICAL] HIGH
Immediate action: Verify specimen (check for hemolysis), obtain ECG,
consider calcium gluconate if ECG changes present
[... additional panels ...]
CLINICAL CORRELATIONS
=====================
- Microcytic anemia: correlate with iron studies, consider GI evaluation
- Critical potassium: patient on lisinopril 20mg -- ACE inhibitor contributing factor
- Recommend: hold ACE inhibitor, repeat potassium stat, ECG
TRENDING SUMMARY
================
Hemoglobin: 12.1 -> 11.2 -> 9.1 (declining over 3 months)
Creatinine: 1.0 -> 1.1 -> 1.0 (stable)
User says: "Review labs for patient 55123 from the last month"
Actions:
fhir_read Patient/55123 -- returns 62-year-old malefhir_search Observation?patient=55123&category=laboratory&date=ge[30-days-ago]&_sort=-date&_count=200 -- returns 18 Observations: CMP, CBC, lipid panelfhir_search Observation?patient=55123&code=718-7&_sort=-date&_count=5 -- prior hemoglobin values for delta checkfhir_search Condition?patient=55123&clinical-status=active -- returns Type 2 DM, hypertensionfhir_search MedicationStatement?patient=55123&status=active -- returns metformin, lisinopril, atorvastatinResult: Structured lab report showing CMP within normal limits, CBC with mild normocytic anemia (Hgb 11.8, stable from prior 11.9), lipid panel at goal on statin (LDL 68). Note: HbA1c 7.8% -- above ADA target for most adults. Recommend diabetes medication optimization. Correlate metformin with normal lactate. Atorvastatin with normal ALT/AST.
User says: "What do the latest labs show for patient emr-9981?"
Actions:
fhir_read Patient/emr-9981 -- returns 45-year-old femalefhir_search Observation?patient=emr-9981&category=laboratory&_sort=-date&_count=200 -- returns recent labs with potassium 2.4 mEq/L (interpretation: LL), sodium 118 mEq/L (interpretation: LL)fhir_search Observation?patient=emr-9981&code=2823-3&_sort=-date&_count=5 -- prior potassium valuesfhir_search Observation?patient=emr-9981&code=2951-2&_sort=-date&_count=5 -- prior sodium valuesfhir_search MedicationStatement?patient=emr-9981&status=active -- returns furosemide, SSRIResult:
[CRITICAL] Potassium: 2.4 mEq/L (ref 3.5-5.0) -- Critical low
Prior: 3.8 mEq/L (2 weeks ago) -- delta -1.4 mEq/L
Action: Obtain ECG stat, IV potassium replacement, hold furosemide
Correlation: furosemide 40mg daily -- likely causative
[CRITICAL] Sodium: 118 mEq/L (ref 136-145) -- Critical low
Prior: 134 mEq/L (2 weeks ago) -- delta -16 mEq/L
Action: Assess volume status, check serum osmolality, urine sodium/osmolality
Correlation: SSRI (sertraline) -- SIADH risk factor. Furosemide -- additional contributor
Caution: Correct sodium no faster than 8 mEq/L per 24 hours (osmotic demyelination risk)
User says: "Show me the creatinine trend for patient 7742 over the past year"
Actions:
fhir_read Patient/7742 -- returns 71-year-old malefhir_search Observation?patient=7742&code=2160-0&date=ge[1-year-ago]&_sort=date -- returns 6 creatinine values over 12 monthsfhir_search Condition?patient=7742&clinical-status=active -- returns CKD stage 3, hypertension, diabetesResult:
CREATININE TREND -- Patient 7742 (71M, CKD Stage 3)
====================================================
2024-02: 1.4 mg/dL (eGFR ~49)
2024-04: 1.5 mg/dL (eGFR ~45)
2024-06: 1.6 mg/dL (eGFR ~42)
2024-08: 1.5 mg/dL (eGFR ~45)
2024-10: 1.8 mg/dL (eGFR ~36)
2025-01: 2.1 mg/dL (eGFR ~30)
Trajectory: declining eGFR, accelerating in last 3 months
Rate of decline: ~13 mL/min/1.73m2 per year (rapid, threshold >5)
Pattern: Progression from CKD Stage 3a to Stage 3b
Action: Nephrology referral, review nephrotoxic medications, check urine albumin
category=laboratory is supported by the FHIR server. Some servers use category=http://terminology.hl7.org/CodeSystem/observation-category|laboratory as the full system URL.ge[30-days-ago] may miss infrequent labs.referenceRange. Fall back to standard reference ranges by age and sex from references/reference-ranges.md.interpretation coding instead -- this may be the only abnormal flag available.component array (e.g., CBC panel LOINC 58410-2 with WBC, RBC, etc. as components). Others return each analyte as a separate Observation.hasMember references on panel-level Observations that point to individual result Observations.valueQuantity on the parent and component[].valueQuantity to capture all results._count parameter or removing date filter to find historical values.critical-value-alert-generator -- for structured critical value alerting and notification workflowsdiabetes-panel-review -- for focused diabetes lab interpretation with ADA guideline applicationrenal-function-dashboard -- for comprehensive renal function assessment and CKD stagingpreoperative-lab-checklist -- for evaluating lab readiness before surgical procedures