@prefix fhir: <http://hl7.org/fhir/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

# - resource -------------------------------------------------------------------

<http://hl7.org/fhir/OperationDefinition/Patient-match> a fhir:OperationDefinition ;
  fhir:nodeRole fhir:treeRoot ;
  fhir:id [ fhir:v "Patient-match"] ; # 
  fhir:text [
     fhir:status [ fhir:v "generated" ] ;
     fhir:div [ fhir:v "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p class=\"res-header-id\"><b>Generated Narrative: OperationDefinition Patient-match</b></p><a name=\"Patient-match\"> </a><a name=\"hcPatient-match\"> </a><p>URL: [base]/Patient/$match</p><h3>Parameters</h3><table class=\"grid\"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Scope</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>resource</td><td/><td>1..1</td><td><a href=\"resource.html\">Resource</a></td><td/><td><div><p>Use this to provide an entire set of patient details for the MPI to match against (e.g. POST a patient record to Patient/$match).</p>\n</div></td></tr><tr><td>IN</td><td>onlySingleMatch</td><td/><td>0..1</td><td><a href=\"datatypes.html#boolean\">boolean</a></td><td/><td><div><p>If there are multiple potential matches, the server should identify the single most appropriate match that should be used with future interactions with the server (for example, as part of a subsequent create interaction).</p>\n</div></td></tr><tr><td>IN</td><td>onlyCertainMatches</td><td/><td>0..1</td><td><a href=\"datatypes.html#boolean\">boolean</a></td><td/><td><div><p>If there are multiple potential matches, the server should be certain that each of the records are for the same patients.  This could happen if the records are duplicates, are the same person for the purpose of data segregation, or other reasons.  When false, the server may return multiple results with each result graded accordingly.</p>\n</div></td></tr><tr><td>IN</td><td>count</td><td/><td>0..1</td><td><a href=\"datatypes.html#integer\">integer</a></td><td/><td><div><p>The maximum number of records to return. If no value is provided, the server decides how many matches to return. Note that clients should be careful when using this, as it may prevent probable - and valid - matches from being returned</p>\n</div></td></tr><tr><td>OUT</td><td>return</td><td/><td>1..1</td><td><a href=\"bundle.html\">Bundle</a></td><td/><td><div><p>The bundle type is \"searchset\"</p>\n<p>A bundle contain a set of Patient records that represent possible matches, optionally it may also contain an OperationOutcome with further information about the search results (such as warnings or information messages, such as a count of records that were close but eliminated)  If the operation was unsuccessful, then an OperationOutcome may be returned along with a BadRequest status Code (e.g. security issue, or insufficient properties in patient fragment - check against profile)</p>\n</div></td></tr></table><div><p>The response from an \"mpi\" query is a bundle containing patient records, ordered from most likely to least likely. If there are no patient matches, the MPI SHALL return an empty search set with no error, but may include an operation outcome with further advice regarding patient selection. All patient records SHALL have a search score from 0 to 1, where 1 is the most certain match, along with an extension \"<a href=\"https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-match-grade.html\">http://hl7.org/fhir/StructureDefinition/match-grade</a>\" that indicates the MPI's position on the match quality.</p>\n</div></div>"^^rdf:XMLLiteral ]
  ] ; # 
  fhir:extension ( [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm>
     ] ;
     fhir:value [
       a fhir:Integer ;
       fhir:v 5
     ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status>
     ] ;
     fhir:value [
       a fhir:Code ;
       fhir:v "normative"
     ]
  ] [
     fhir:url [
       fhir:v "http://hl7.org/fhir/StructureDefinition/structuredefinition-wg"^^xsd:anyURI ;
       fhir:l <http://hl7.org/fhir/StructureDefinition/structuredefinition-wg>
     ] ;
     fhir:value [
       a fhir:Code ;
       fhir:v "pa"
     ]
  ] ) ; # 
  fhir:url [
     fhir:v "http://hl7.org/fhir/OperationDefinition/Patient-match"^^xsd:anyURI ;
     fhir:l <http://hl7.org/fhir/OperationDefinition/Patient-match>
  ] ; # 
  fhir:version [ fhir:v "6.0.0-ballot4"] ; # 
  fhir:name [ fhir:v "Match"] ; # 
  fhir:title [ fhir:v "Find patient matches using MPI based logic"] ; # 
  fhir:status [ fhir:v "active"] ; # 
  fhir:kind [ fhir:v "operation"] ; # 
  fhir:experimental [ fhir:v false] ; # 
  fhir:date [ fhir:v "2026-06-11T13:08:54+00:00"^^xsd:dateTime] ; # 
  fhir:publisher [ fhir:v "HL7 International / Patient Administration"] ; # 
  fhir:contact ( [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://hl7.org/fhir" ]
     ] [
       fhir:system [ fhir:v "email" ] ;
       fhir:value [ fhir:v "fhir@lists.hl7.org" ]
     ] )
  ] [
     fhir:telecom ( [
       fhir:system [ fhir:v "url" ] ;
       fhir:value [ fhir:v "http://www.hl7.org/Special/committees/pafm" ]
     ] )
  ] ) ; # 
  fhir:description [ fhir:v "A Master Patient Index ([MPI](http://en.wikipedia.org/wiki/Enterprise_master_patient_index) ) is a service used to manage patient identification in a context where multiple patient databases exist. Healthcare applications and middleware use the MPI to match patients between the databases, and to store new patient details as they are encountered. MPIs are highly specialized applications, often tailored extensively to the institution's particular mix of patients. MPIs can also be run on a regional and national basis.  \n\nTo ask an MPI to match a patient, clients use the \"$match\" operation, which accepts a patient resource which may be only partially complete. The data provided is interpreted as an MPI input and processed by an algorithm of some kind that uses the data to determine the most appropriate matches in the patient set.  Note that different MPI matching algorithms have different required inputs. Consult with the vendor implementing the $match operation as to its specific behaviors.\r\r  The generic $match operation does not specify any particular algorithm, nor a minimum set of information that must be provided when asking for an MPI match operation to be performed, but many implementations will have a set of minimum information, which may be declared in their definition of the $match operation by specifying a profile on the resource parameter, indicating which properties are required in the search.\r\rThe patient resource submitted to the operation does not have to be complete, nor does it need to pass validation (i.e. mandatory fields don't need to be populated), but it does have to be a valid instance, as it is used as the reference data to match against.\r\r  Implementers of the $match algorithm should consider the relevance of returning inactive patients, particularly ones associated with patient merges.\r\rE.g. If an inactive patient is \"matched\" and its merged target resource will be included, then the inactive one may be excluded, however if a patient was just marked as inactive for other reasons, it could be included in the results.\r\r(any specific MPI algorithm may or might not behave as in these examples)"] ; # 
  fhir:jurisdiction ( [
     fhir:coding ( [
       fhir:system [
         fhir:v "http://unstats.un.org/unsd/methods/m49/m49.htm"^^xsd:anyURI ;
         fhir:l <http://unstats.un.org/unsd/methods/m49/m49.htm>
       ] ;
       fhir:code [ fhir:v "001" ] ;
       fhir:display [ fhir:v "World" ]
     ] )
  ] ) ; # 
  fhir:affectsState [ fhir:v false] ; # 
  fhir:code [ fhir:v "match"] ; # 
  fhir:comment [ fhir:v "The response from an \"mpi\" query is a bundle containing patient records, ordered from most likely to least likely. If there are no patient matches, the MPI SHALL return an empty search set with no error, but may include an operation outcome with further advice regarding patient selection. All patient records SHALL have a search score from 0 to 1, where 1 is the most certain match, along with an extension \"[http://hl7.org/fhir/StructureDefinition/match-grade](https://build.fhir.org/ig/HL7/fhir-extensions/StructureDefinition-match-grade.html)\" that indicates the MPI's position on the match quality."] ; # 
  fhir:resource ( [ fhir:v "Patient"] ) ; # 
  fhir:system [ fhir:v false] ; # 
  fhir:type [ fhir:v true] ; # 
  fhir:instance [ fhir:v false] ; # 
  fhir:parameter ( [
     fhir:name [ fhir:v "resource" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "Use this to provide an entire set of patient details for the MPI to match against (e.g. POST a patient record to Patient/$match)." ] ;
     fhir:type [ fhir:v "Resource" ]
  ] [
     fhir:name [ fhir:v "onlySingleMatch" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "If there are multiple potential matches, the server should identify the single most appropriate match that should be used with future interactions with the server (for example, as part of a subsequent create interaction)." ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "onlyCertainMatches" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "If there are multiple potential matches, the server should be certain that each of the records are for the same patients.  This could happen if the records are duplicates, are the same person for the purpose of data segregation, or other reasons.  When false, the server may return multiple results with each result graded accordingly." ] ;
     fhir:type [ fhir:v "boolean" ]
  ] [
     fhir:name [ fhir:v "count" ] ;
     fhir:use [ fhir:v "in" ] ;
     fhir:min [ fhir:v "0"^^xsd:nonNegativeInteger ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "The maximum number of records to return. If no value is provided, the server decides how many matches to return. Note that clients should be careful when using this, as it may prevent probable - and valid - matches from being returned" ] ;
     fhir:type [ fhir:v "integer" ]
  ] [
     fhir:name [ fhir:v "return" ] ;
     fhir:use [ fhir:v "out" ] ;
     fhir:min [ fhir:v "1"^^xsd:nonNegativeInteger ] ;
     fhir:max [ fhir:v "1" ] ;
     fhir:documentation [ fhir:v "The bundle type is \"searchset\"\r\rA bundle contain a set of Patient records that represent possible matches, optionally it may also contain an OperationOutcome with further information about the search results (such as warnings or information messages, such as a count of records that were close but eliminated)  If the operation was unsuccessful, then an OperationOutcome may be returned along with a BadRequest status Code (e.g. security issue, or insufficient properties in patient fragment - check against profile)" ] ;
     fhir:type [ fhir:v "Bundle" ]
  ] ) . # 

# -------------------------------------------------------------------------------------

