soap-note-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited soap-note-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Generate structured SOAP (Subjective, Objective, Assessment, Plan) notes from FHIR encounter data. Pull chief complaint, history of present illness context, vital signs, laboratory results, active medications, active conditions, and procedures performed during the encounter. Support specialty-specific formatting for primary care, emergency department, and inpatient encounters. Optionally create a DocumentReference resource to persist the generated note.
| Resource | Purpose | Key Fields |
|---|---|---|
| Encounter | Visit context, chief complaint, type | status, class, type, reasonCode, period, participant |
| Condition | Active problems, encounter diagnoses | code, clinicalStatus, verificationStatus, encounter |
| Observation | Vitals, labs, clinical findings | code, value[x], effectiveDateTime, category |
| MedicationRequest | Current medications, new prescriptions | medicationCodeableConcept, status, authoredOn, dosageInstruction |
| Procedure | Procedures performed during encounter | code, status, performedDateTime, outcome |
| AllergyIntolerance | Allergy list for note context | code, clinicalStatus, reaction |
| Patient | Demographics for note header | name, birthDate, gender, identifier |
| DocumentReference | Persist the generated note | type, content, context, date |
Tool: fhir_read
resourceType: "Encounter"
id: "[encounter-id]"Extract:
reasonCode[0].text or reasonCode[0].coding[0].displaytype[0].coding[0].display (e.g., Office Visit, ED Visit, Follow-up)class.code (AMB = ambulatory, EMER = emergency, IMP = inpatient)period.start and period.endparticipant where type.coding.code = "ATND"If no encounter ID is provided, search by patient and date:
Tool: fhir_search
resourceType: "Encounter"
queryParams: "patient=[patient-id]&date=[YYYY-MM-DD]&_sort=-date&_count=1"Tool: fhir_read
resourceType: "Patient"
id: "[patient-id]"Extract name, DOB (calculate age), gender, MRN for note header.
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&category=vital-signs&date=ge[encounter-start]&date=le[encounter-end]&_sort=-date"Map vital signs by LOINC code:
Tool: fhir_search
resourceType: "Observation"
queryParams: "patient=[patient-id]&category=laboratory&date=ge[encounter-start]&_sort=-date&_count=50"Group lab results by panel. Present abnormal values with reference ranges. Flag critical values.
Tool: fhir_search
resourceType: "MedicationRequest"
queryParams: "patient=[patient-id]&status=active&_count=100"Separate into:
authoredOn before encounter startauthoredOn during encounter period6a: Encounter-specific diagnoses
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&encounter=[encounter-id]"6b: Active problem list
Tool: fhir_search
resourceType: "Condition"
queryParams: "patient=[patient-id]&clinical-status=active"Tool: fhir_search
resourceType: "Procedure"
queryParams: "patient=[patient-id]&encounter=[encounter-id]"Tool: fhir_search
resourceType: "AllergyIntolerance"
queryParams: "patient=[patient-id]&clinical-status=active"Structure the note based on encounter class:
For ambulatory (AMB) encounters:
SOAP NOTE
=========
Patient: [name] | MRN: [mrn] | DOB: [dob] (Age: [age]) | Sex: [gender]
Date: [encounter-date] | Provider: [attending]
Visit Type: [type] | Encounter: [encounter-id]
SUBJECTIVE
----------
Chief Complaint: [reasonCode text]
HPI: [Synthesize from encounter reason, active conditions relevant to visit]
ROS: [Derive from Observation resources with category=survey if available]
Current Medications: [List with dose/frequency]
Allergies: [List with reaction type]
OBJECTIVE
---------
Vitals: T [temp] | HR [hr] | RR [rr] | BP [sys]/[dia] | SpO2 [spo2]% | Wt [wt] | Ht [ht] | BMI [bmi]
[Physical exam findings from Observation category=exam if available]
Labs: [Grouped by panel, abnormals flagged]
ASSESSMENT
----------
[Numbered problem list with ICD-10 codes from Condition.code]
1. [Primary diagnosis] - [ICD-10]
2. [Secondary diagnosis] - [ICD-10]
PLAN
----
[Per problem:]
1. [Diagnosis]: [Actions - new meds, referrals, follow-up]
2. [Diagnosis]: [Actions]
Procedures Performed: [List from Step 7]
Follow-up: [From CarePlan if available]For emergency (EMER) encounters, add: triage acuity, time-stamped reassessments, disposition.
For inpatient (IMP) encounters, add: admitting diagnosis, hospital day number, consults.
Tool: fhir_create
resourceType: "DocumentReference"
resource: {
"resourceType": "DocumentReference",
"status": "current",
"type": {
"coding": [{
"system": "http://loinc.org",
"code": "11506-3",
"display": "Progress note"
}]
},
"subject": {"reference": "Patient/[patient-id]"},
"date": "[current-datetime]",
"author": [{"reference": "Practitioner/[practitioner-id]"}],
"content": [{
"attachment": {
"contentType": "text/plain",
"data": "[base64-encoded-note]"
}
}],
"context": {
"encounter": [{"reference": "Encounter/[encounter-id]"}]
}
}Use LOINC codes for document type based on setting:
User says: "Write a SOAP note for encounter ENC-5678 for patient 12345."
Actions:
fhir_read Encounter/ENC-5678. Returns: AMB class, type=Office Visit, reasonCode="Annual physical", period 2024-03-15T09:00 to 2024-03-15T09:30, attending=Dr. Smith.fhir_read Patient/12345. Returns: John Doe, DOB 1970-05-20, Male, MRN-12345.fhir_search Observation with category=vital-signs for encounter window. Returns: T 98.6, HR 72, RR 16, BP 142/88, SpO2 99%, Wt 210 lbs, Ht 70 in, BMI 30.1.fhir_search Observation with category=laboratory. Returns: HbA1c 7.2%, lipid panel (TC 240, LDL 155, HDL 38, TG 235).fhir_search MedicationRequest active. Returns: metformin 1000mg BID, lisinopril 10mg daily.fhir_search Condition for encounter + active. Returns: encounter dx: HTN uncontrolled, T2DM. Active: HTN, T2DM, obesity.fhir_search AllergyIntolerance. Returns: penicillin (rash).Result:
SOAP NOTE
=========
Patient: John Doe | MRN: MRN-12345 | DOB: 1970-05-20 (Age: 53) | Sex: Male
Date: 2024-03-15 | Provider: Dr. Smith
Visit Type: Office Visit | Encounter: ENC-5678
SUBJECTIVE
----------
Chief Complaint: Annual physical
Current Medications: Metformin 1000mg BID, Lisinopril 10mg daily
Allergies: Penicillin (rash)
OBJECTIVE
---------
Vitals: T 98.6 | HR 72 | RR 16 | BP 142/88 | SpO2 99% | Wt 210 lbs | Ht 70 in | BMI 30.1
Labs:
HbA1c: 7.2% [HIGH - goal <7%]
Total Cholesterol: 240 [HIGH]
LDL: 155 [HIGH]
HDL: 38 [LOW]
Triglycerides: 235 [HIGH]
ASSESSMENT
----------
1. Hypertension, uncontrolled - I10
2. Type 2 diabetes mellitus, above goal - E11.65
3. Hyperlipidemia, mixed - E78.2
4. Obesity, BMI 30.1 - E66.01
PLAN
----
1. HTN: Increase lisinopril to 20mg daily. Recheck BP in 2 weeks.
2. T2DM: Continue metformin. Reinforce dietary counseling. Recheck HbA1c in 3 months.
3. Hyperlipidemia: Start atorvastatin 20mg daily. Fasting lipid panel in 6 weeks.
4. Obesity: Discussed diet and exercise. Referral to nutrition.
Follow-up: 3 months or sooner if BP not improved at 2-week check.User says: "Generate SOAP note for the ED visit, patient ID pt-9999, today's encounter."
Actions:
fhir_search Encounter for patient pt-9999, today, class=EMER. Returns: encounter ENC-ED-100, reasonCode="Chest pain", period started 2024-03-15T14:22.fhir_read Patient/pt-9999. Returns: Mary Johnson, DOB 1952-08-10, Female.fhir_search Observation vital-signs during encounter. Returns: T 98.2, HR 92, RR 20, BP 168/95, SpO2 97%.fhir_search Observation laboratory. Returns: Troponin I 0.02 (normal), BMP normal, CBC normal, D-dimer 0.3 (normal).fhir_search Procedure for encounter. Returns: 12-lead ECG performed.fhir_search Condition for encounter. Returns: Chest pain NOS (R07.9), HTN (I10).Result:
SOAP NOTE - EMERGENCY DEPARTMENT
=================================
Patient: Mary Johnson | MRN: MRN-9999 | DOB: 1952-08-10 (Age: 71) | Sex: Female
Date: 2024-03-15 14:22 | Encounter: ENC-ED-100
SUBJECTIVE
----------
Chief Complaint: Chest pain
HPI: 71-year-old female presenting with substernal chest pain onset 2 hours prior.
OBJECTIVE
---------
Vitals: T 98.2 | HR 92 | RR 20 | BP 168/95 | SpO2 97%
Labs:
Troponin I: 0.02 ng/mL [NORMAL]
BMP: Within normal limits
CBC: Within normal limits
D-dimer: 0.3 mcg/mL [NORMAL]
Procedures: 12-lead ECG performed
ASSESSMENT
----------
1. Chest pain, unspecified - R07.9
2. Hypertension - I10
PLAN
----
1. Chest pain: Serial troponins q3h. Cardiology consult if troponin rises. Chest pain observation protocol.
2. HTN: Elevated in setting of pain/anxiety. Monitor.
Disposition: Observation pending serial troponins.Encounter.type for visit type context.fhir_search Condition with encounter=[encounter-id]. Use the primary diagnosis as a proxy for chief complaint.fhir_search Observation with patient=[id]&code=8661-1&encounter=[encounter-id].patient=[id]&category=vital-signs&_sort=-date&_count=10.encounter=[encounter-id] as a search parameter on Observation.hasMember references, follow each reference with fhir_read to retrieve individual result values.Observation.component array for individual values.history-and-physical-generator - For comprehensive H&P documentation on admissionprogress-note-writer - For daily inpatient progress notesclinical-summary-generator - For broader clinical summary beyond a single encounterproblem-list-review - For validating the assessment problem list~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.