FHIR:Vissue-MM-2759 Search result examples: verschil tussen versies

Uit informatiestandaarden
Naar navigatie springen Naar zoeken springen
Regel 4: Regel 4:
 
<syntaxhighlight lang="xml" highlight="" style="max-height:400px; overflow: auto;">
 
<syntaxhighlight lang="xml" highlight="" style="max-height:400px; overflow: auto;">
 
<Bundle xmlns="http://hl7.org/fhir" >
 
<Bundle xmlns="http://hl7.org/fhir" >
     <id value="example-id"/> <!-- Bundle.id is not different than any other Resource.id -->
+
     <id value="example-id1"/> <!-- Bundle.id is not different than any other Resource.id -->
 
     <type value="searchset"/> <!-- Bundle.type should be set to 'searchset' -->
 
     <type value="searchset"/> <!-- Bundle.type should be set to 'searchset' -->
 
     <total value="1"/> <!-- Bundle.total is set to the number of matches for the request -->
 
     <total value="1"/> <!-- Bundle.total is set to the number of matches for the request -->
Regel 17: Regel 17:
 
                 <id value="observation-123" />
 
                 <id value="observation-123" />
 
                 ...
 
                 ...
 +
                <subject>
 +
                    <reference value="Patient/patient-123" /> <!-- The reference to the Patient resource can be a relative or absolute URL. -->
 +
                </subject>
 
             </Observation>
 
             </Observation>
 
         </resource>
 
         </resource>
 
         <search>
 
         <search>
 
             <mode value="match"/> <!-- Resources that match the search request have mode set to 'match' -->
 
             <mode value="match"/> <!-- Resources that match the search request have mode set to 'match' -->
 +
        </search>
 +
    </entry>
 +
</Bundle>
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="xml" highlight="" style="max-height:400px; overflow: auto;">
 +
<Bundle xmlns="http://hl7.org/fhir" >
 +
    <id value="example-id2"/> <!-- Bundle.id is not different than any other Resource.id -->
 +
    <type value="searchset"/> <!-- Bundle.type should be set to 'searchset' -->
 +
    <total value="1"/> <!-- Bundle.total is still set to the number of _matches_, even though more resources are included -->
 +
    <link>
 +
        <relation value="self"/>
 +
        <url value="https://example-server.nl/fhir/Observation?code=http://loinc.org|85354-9"/> <!-- The "self link" reflects the search as it was understood by the server -->
 +
    </link>
 +
    <entry>
 +
        <fullUrl value="urn:uuid:799c5790-f2aa-4045-8c19-a0d54773a059"/> <!-- The server doesn't support read, so the fullUrl is an ephemeral identifier that only has value within the Bundle -->
 +
        <resource>
 +
            <Observation>
 +
                <!-- <id value="799c5790-f2aa-4045-8c19-a0d54773a059" /> it is recommended NOT to use the ephemeral id as Resource.id, but the opinions on this topic are divided -->
 +
                ...
 +
                <subject>
 +
                    <reference value="urn:uuid:69aefd96-b37d-4323-866b-762536c03375" /> <!-- The server doesn't support read for the Patient resource, so it's included in the Bundle using an ephemeral fullUrl -->
 +
                    <reference value="http://example-server.nl/Patient/patient-123" /> <!-- If the server somehow _does_ support read for the Patient resource, an absolute URL could be used -->
 +
                    <!-- <reference value="Patient/patient-123" /> However, a relative URL is invalid because it is relative to the fullUrl of the Observation resource. So in this case, it cannot be resolved to an absolute URL -->
 +
                </subject>
 +
            </Observation>
 +
        </resource>
 +
        <search>
 +
            <mode value="match"/> <!-- Resources that match the search request have mode set to 'match' -->
 +
        </search>
 +
    </entry>
 +
    <entry>
 +
        <fullUrl value="urn:uuid:69aefd96-b37d-4323-866b-762536c03375"> <!-- The ephemeral fullUrl to refer the Patient resource -->
 +
        <resource>
 +
            <Patient>
 +
                ....
 +
            </Patient>
 +
        </resource>
 +
        <search>
 +
            <mode value="include" />
 
         </search>
 
         </search>
 
     </entry>
 
     </entry>
 
</Bundle>
 
</Bundle>
 
</syntaxhighlight>
 
</syntaxhighlight>

Versie van 13 mei 2022 15:24


<Bundle xmlns="http://hl7.org/fhir" >
    <id value="example-id1"/> <!-- Bundle.id is not different than any other Resource.id -->
    <type value="searchset"/> <!-- Bundle.type should be set to 'searchset' -->
    <total value="1"/> <!-- Bundle.total is set to the number of matches for the request -->
    <link>
        <relation value="self"/>
        <url value="https://example-server.nl/fhir/Observation?code=http://loinc.org|85354-9"/> <!-- The "self link" reflects the search as it was understood by the server -->
    </link>
    <entry>
        <fullUrl value="https://example-server.nl/fhir/Observation/observation-123"/>
        <resource>
            <Observation>
                <id value="observation-123" />
                ...
                <subject>
                    <reference value="Patient/patient-123" /> <!-- The reference to the Patient resource can be a relative or absolute URL. -->
                </subject>
            </Observation>
        </resource>
        <search>
            <mode value="match"/> <!-- Resources that match the search request have mode set to 'match' -->
        </search>
    </entry>
</Bundle>
<Bundle xmlns="http://hl7.org/fhir" >
    <id value="example-id2"/> <!-- Bundle.id is not different than any other Resource.id -->
    <type value="searchset"/> <!-- Bundle.type should be set to 'searchset' -->
    <total value="1"/> <!-- Bundle.total is still set to the number of _matches_, even though more resources are included -->
    <link>
        <relation value="self"/>
        <url value="https://example-server.nl/fhir/Observation?code=http://loinc.org|85354-9"/> <!-- The "self link" reflects the search as it was understood by the server -->
    </link>
    <entry>
        <fullUrl value="urn:uuid:799c5790-f2aa-4045-8c19-a0d54773a059"/> <!-- The server doesn't support read, so the fullUrl is an ephemeral identifier that only has value within the Bundle -->
        <resource>
            <Observation>
                <!-- <id value="799c5790-f2aa-4045-8c19-a0d54773a059" /> it is recommended NOT to use the ephemeral id as Resource.id, but the opinions on this topic are divided -->
                ...
                <subject>
                    <reference value="urn:uuid:69aefd96-b37d-4323-866b-762536c03375" /> <!-- The server doesn't support read for the Patient resource, so it's included in the Bundle using an ephemeral fullUrl -->
                    <reference value="http://example-server.nl/Patient/patient-123" /> <!-- If the server somehow _does_ support read for the Patient resource, an absolute URL could be used -->
                    <!-- <reference value="Patient/patient-123" /> However, a relative URL is invalid because it is relative to the fullUrl of the Observation resource. So in this case, it cannot be resolved to an absolute URL -->
                </subject>
            </Observation>
        </resource>
        <search>
            <mode value="match"/> <!-- Resources that match the search request have mode set to 'match' -->
        </search>
    </entry>
    <entry>
        <fullUrl value="urn:uuid:69aefd96-b37d-4323-866b-762536c03375"> <!-- The ephemeral fullUrl to refer the Patient resource -->
        <resource>
            <Patient>
                ....
            </Patient>
        </resource>
        <search>
            <mode value="include" />
        </search>
    </entry>
</Bundle>