<?xml version="1.0" encoding="UTF-8"?>

<TestScript xmlns="http://hl7.org/fhir">
  <id value="ie-core-testscript-patient-search"/>
  <text>
    <status value="generated"/><div xmlns="http://www.w3.org/1999/xhtml"><p class="res-header-id"><b>Generated Narrative: TestScript ie-core-testscript-patient-search</b></p><a name="ie-core-testscript-patient-search"> </a><a name="hcie-core-testscript-patient-search"> </a><p><b>url</b>: <a href="TestScript-ie-core-testscript-patient-search.html">TestScript IE Core TestScript: Patient Search</a></p><p><b>version</b>: 0.3.0</p><p><b>name</b>: IECoreTestScriptPatientSearch</p><p><b>title</b>: IE Core TestScript: Patient Search</p><p><b>status</b>: Draft</p><p><b>date</b>: 2025-01-01</p><p><b>publisher</b>: Nithin Mohan T K (Proof of Concept)</p><p><b>contact</b>: Nithin Mohan T K (Proof of Concept): <a href="https://github.com/hl7-ie">https://github.com/hl7-ie</a>,<a href="mailto:nithinmohantk1@gmail.com">nithinmohantk1@gmail.com</a></p><p><b>description</b>: </p><div><p>Verifies that a FHIR server supports searching for Patient resources by name, identifier, and birthdate.</p>
</div><p><b>jurisdiction</b>: <span title="Codes:{urn:iso:std:iso:3166 IE}">Ireland</span></p><blockquote><p><b>test</b></p><p><b>name</b>: Patient Search by Name</p><p><b>description</b>: Search for a Patient by family name.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.4.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>Patient</td><td>Search for Patients by family name</td><td>json</td><td>true</td><td>?family=Murphy</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Confirm the response is HTTP 200 OK</td><td>okay</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Confirm the response is a Bundle</td><td>Bundle</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: Patient Search by IHI</p><p><b>description</b>: Search for a Patient by IHI (Individual Health Identifier).</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.4.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>Patient</td><td>Search for Patients by IHI</td><td>json</td><td>true</td><td>?identifier=https://hl7-ie.github.io/ie-core/fhir/ie/core/sid/ihi|210000000012345678</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Confirm the response is HTTP 200 OK</td><td>okay</td><td>false</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Resource</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Confirm the response is a Bundle</td><td>Bundle</td><td>false</td></tr></table></blockquote></blockquote><blockquote><p><b>test</b></p><p><b>name</b>: Patient Search by Birthdate</p><p><b>description</b>: Search for a Patient by date of birth.</p><blockquote><p><b>action</b></p><h3>Operations</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Type</b></td><td><b>Resource</b></td><td><b>Description</b></td><td><b>Accept</b></td><td><b>EncodeRequestUrl</b></td><td><b>Params</b></td></tr><tr><td style="display: none">*</td><td><a href="http://terminology.hl7.org/7.4.0/CodeSystem-testscript-operation-codes.html#testscript-operation-codes-search">Test script operation code: search</a> (Search)</td><td>Patient</td><td>Search for Patients by birthdate</td><td>json</td><td>true</td><td>?birthdate=1978-05-15</td></tr></table></blockquote><blockquote><p><b>action</b></p><h3>Asserts</h3><table class="grid"><tr><td style="display: none">-</td><td><b>Description</b></td><td><b>Response</b></td><td><b>WarningOnly</b></td></tr><tr><td style="display: none">*</td><td>Confirm the response is HTTP 200 OK</td><td>okay</td><td>false</td></tr></table></blockquote></blockquote></div>
  </text>
  <url value="https://hl7-ie.github.io/ie-core/fhir/ie/core/TestScript/ie-core-testscript-patient-search"/>
  <version value="0.3.0"/>
  <name value="IECoreTestScriptPatientSearch"/>
  <title value="IE Core TestScript: Patient Search"/>
  <status value="draft"/>
  <date value="2025-01-01"/>
  <publisher value="Nithin Mohan T K (Proof of Concept)"/>
  <contact>
    <name value="Nithin Mohan T K (Proof of Concept)"/>
    <telecom>
      <system value="url"/>
      <value value="https://github.com/hl7-ie"/>
    </telecom>
    <telecom>
      <system value="email"/>
      <value value="nithinmohantk1@gmail.com"/>
    </telecom>
  </contact>
  <description value="Verifies that a FHIR server supports searching for Patient resources by name, identifier, and birthdate."/>
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166"/>
      <code value="IE"/>
      <display value="Ireland"/>
    </coding>
  </jurisdiction>
  <test>
    <name value="Patient Search by Name"/>
    <description value="Search for a Patient by family name."/>
    <action>
      <operation>
        <type>
          <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Patient"/>
        <description value="Search for Patients by family name"/>
        <accept value="json"/>
        <encodeRequestUrl value="true"/>
        <params value="?family=Murphy"/>
      </operation>
    </action>
    <action>
      <assert>
        <description value="Confirm the response is HTTP 200 OK"/>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <description value="Confirm the response is a Bundle"/>
        <resource value="Bundle"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="Patient Search by IHI"/>
    <description value="Search for a Patient by IHI (Individual Health Identifier)."/>
    <action>
      <operation>
        <type>
          <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Patient"/>
        <description value="Search for Patients by IHI"/>
        <accept value="json"/>
        <encodeRequestUrl value="true"/>
        <params value="?identifier=https://hl7-ie.github.io/ie-core/fhir/ie/core/sid/ihi|210000000012345678"/>
      </operation>
    </action>
    <action>
      <assert>
        <description value="Confirm the response is HTTP 200 OK"/>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
    <action>
      <assert>
        <description value="Confirm the response is a Bundle"/>
        <resource value="Bundle"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
  <test>
    <name value="Patient Search by Birthdate"/>
    <description value="Search for a Patient by date of birth."/>
    <action>
      <operation>
        <type>
          <system value="http://terminology.hl7.org/CodeSystem/testscript-operation-codes"/>
          <code value="search"/>
        </type>
        <resource value="Patient"/>
        <description value="Search for Patients by birthdate"/>
        <accept value="json"/>
        <encodeRequestUrl value="true"/>
        <params value="?birthdate=1978-05-15"/>
      </operation>
    </action>
    <action>
      <assert>
        <description value="Confirm the response is HTTP 200 OK"/>
        <response value="okay"/>
        <warningOnly value="false"/>
      </assert>
    </action>
  </test>
</TestScript>