AI & XML / LLM test suite / Results / Test cases / FHIR_HFIR_02_Bundle-Collection_json

Test case description

This test checks whether the model can generate a FHIR Bundle of type collection with a Patient resource and an Observation representing HFIR through Observation.component with valueString.

Source file

FHIR_HFIR_02_BundleCollection_json.txt

Series

2

Categories

fhir, json, hfir, bundle

Evaluation

LLM judge

Prompt SHA-256

ad62618d05079ab141ef77a7258b0c1c76681dc20337061f48110bbf9e771fb9

LLM judge: The answer is evaluated with LLM support. A judge model compares the model’s answer with the domain expectation and decides whether its content meets it.

Expected result

Valid FHIR R4 JSON Bundle of type collection with Patient, Observation and four HFIR valueString components modeled exclusively as Observation.component.

Expectation in the catalog

No

Correct result in the catalog

Yes

Judge instruction

Check Bundle.type collection, the Patient–Observation relationship and HFIR represented exclusively in four structured components.

Must be satisfied

  • The output consists solely of a syntactically valid JSON object. Markdown code fences may be removed for evaluation; extra prose, comments and trailing commas are not allowed.

  • The root object contains resourceType with value Bundle.

  • Bundle.entry is an array whose resource objects have the correct resourceType values Patient and Observation.

  • FHIR primitives are JSON values with the correct data type. XML attributes or namespace declarations must not be imitated.

  • The Observation has at least status and code. Observation.subject.reference consistently references the Patient in the Bundle.

  • Bundle.type is exactly collection.

  • The Bundle contains exactly one Patient and one Observation.

  • HFIR content is modeled exclusively in exactly four Observation.component entries H, F, I and R.

  • Each HFIR component uses valueString or its format-compliant FHIR RDF representation and contains a nonempty value.

Error criteria

  • The output is not a parseable JSON object or contains prose or comments outside JSON.

  • resourceType Bundle is missing, or Patient and Observation are not modeled in entry[].resource.

  • XML-style value attributes, xmlns fields treated as mandatory structure, or other mixed syntax are used.

  • Observation.status, Observation.code or the consistent Patient reference is missing.

  • Bundle.type is missing or is not collection.

  • HFIR is additionally or exclusively modeled as Observation.valueString, note, extension, narrative or a separate resource.

  • An HFIR component uses a value type other than valueString or is empty.

Judge note: FHIR JSON has no XML namespace. A missing xmlns field is therefore never an error. Valid FHIR R4 JSON structure is decisive. Clinical HFIR text is judged by semantic plausibility, not particular wording.

Prompt

Baue ein FHIR Bundle als json mit type collection.
Erzeuge eine Patient-Ressource mit zufälliger ID.
Danach eine Observation, in der die HFIR-Elemente als Observation.component vorkommen.
Jeder Abschnitt H, F, I, R soll valueString nutzen.
Inhaltlich soll es eine typische Anamnese aus der Allgemeinmedizin sein.
Gib nur FHIR json aus.

741 Runs 727 evaluated 24.8 % Score 13.6 % exactly correct

Help on evaluation, score and exact correctness

Score is a graded quality measure: correct = 100 %, mostly_correct = 80 %, partial = 50 %, wrong/not_answered = 0 %.

Exactly correct is stricter: only correct-labeled runs count. Mostly correct increases score but does not count as exactly correct.

Evaluated counts all runs with a substantive judgment. LLM-judge errors also count as evaluated, with score 0 %.

Model Category Access route

x

back to top