Difference between revisions of "PCC-9"

From IHE Wiki
Jump to navigation Jump to search
m
Line 197: Line 197:
 
===== Expected Actions -- Care Manager =====
 
===== Expected Actions -- Care Manager =====
 
The Care Manager shall send a query as specified in the QUPC_IN043100UV  interaction.  The message shall be sent using web services as specified in the ITI-TF: Appendix V.
 
The Care Manager shall send a query as specified in the QUPC_IN043100UV  interaction.  The message shall be sent using web services as specified in the ITI-TF: Appendix V.
 +
 +
The Care Manager shall send an audit message to the audit log repository indicating that a query was initiated, and the parameters of query that were supplied (see the queryByParameter element above).
  
 
===== Expected Actions -- Clinical Data Source =====
 
===== Expected Actions -- Clinical Data Source =====
The Clinical Data Source shall send an acknowledgement of the query as specified ??? in the response to the query message, and shall trigger a QUPC_TE043200UV event to initiate the sending of historical data for all matching patients (see below).
+
The Clinical Data Source shall send an acknowledgement of the query as specified in the HL7 [http://www.hl7.org/v3ballot/html/domains/uvci/uvci_GenericMessageTransmission.htm#MCCI_IN000002UV01-int MCCI_IN000002UV01] interaction in the response to the query message, and shall trigger a QUPC_TE043200UV event to initiate the sending of historical data for all matching patients (see below).
 +
 
 +
The Clinical Data Source shall send an audit message to the audit log repository indicating that a query was recieved, and the parameters of query that were supplied (see the queryByParameter element above).
 +
 
 +
The name of the query message shall be QUPC_IN043100UV_Message in the WSDL.  The name of the acknowledgement response message shall be MCCI_IN000002UV01 in the WSDL.
  
The name of the query response message shall be QUPC_IN043100UV_Message in the WSDL.
+
The following WSDL snippet defines the types used for this transaction:
The following WSDL snippet defines the type for this message:
 
 
{|
 
{|
 
|+Query Message Type Definition
 
|+Query Message Type Definition
Line 212: Line 217:
 
       targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
 
       targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
 
     <!-- Include the message schema -->
 
     <!-- Include the message schema -->
     <xsd:include namespace="urn:hl7-org:v3"
+
     <xsd:include namespace="urn:hl7-org:v3" schemaLocation="QUPC_IN043100UV.xsd"/>
      schemaLocation="QUPC_IN043100UV.xsd"/>
+
    <xsd:include namespace="urn:hl7-org:v3" schemaLocation="MCCI_IN000002UV01.xsd"/>
 
   </xsd:schema>
 
   </xsd:schema>
 
</types>
 
</types>
 
</pre>
 
</pre>
 
|}
 
|}
{{Fixme|Include the Ack message schema above }}
 
  
 
The message type is declared to be of the appropriate type by the following WSDL snippet:
 
The message type is declared to be of the appropriate type by the following WSDL snippet:
Line 228: Line 232:
 
<message name='QUPC_IN043100UV_Message'>
 
<message name='QUPC_IN043100UV_Message'>
 
   <part element='hl7:QUPC_IN043100UV' name="Body"/>
 
   <part element='hl7:QUPC_IN043100UV' name="Body"/>
 +
</message>
 +
<message name='MCCI_IN000002UV01_Message'>
 +
  <part element='hl7:MCCI_IN000002UV01' name="Body"/>
 
</message>
 
</message>
 
</pre>
 
</pre>
 
|}
 
|}
{{Fixme|Include the Ack_message message above}}
 
  
 
Other WSDL declarations required for this transaction are defined under the Domain Content section.
 
Other WSDL declarations required for this transaction are defined under the Domain Content section.
  
==== Get Care Record Profile Response ====
 
===== Trigger Events =====
 
This message is triggered upon reciept of a Query Care Record Event Profile Query, or General Query Activate Query Continue or General Query Query Cancel Message.  This corresponds to HL7 trigger event: [http://www.hl7.org/v3ballot/html/domains/uvpc/uvpc_CareRecordQuery.htm#QUPC_TE043200UV-te QUPC_TE043200UV]
 
 
===== Message Semantics =====
 
The Get Care Record Profile Response corresponds to the HL7 Interaction [http://www.hl7.org/v3ballot/html/domains/uvpc/uvpc_CareRecordQuery.htm#QUPC_IN043200UV-int QUPC_IN043200UV].  A schema for this interaction can be found at: http://www.hl7.org/v3ballot2007may/html/processable/multicacheschemas/QUPC_IN043200UV.xsd.  This schema includes:
 
* the transmission wrapper MCCI_MT000300UV01,
 
* the control act wrapper MFMI_MT700712UV01, and
 
* the message payload REPC_MT004000UV.
 
These components of the interaction are specified in the HL7 standards described above.
 
===== Transmission Wrapper =====
 
The transmission wrapper MCCI_MT000300UV01 provides information about the message transmission and routing.  Transmission wrappers are further described in ITI TF-2: Appendix O.
 
 
An example transmission wrapper is given below for this interaction.  Items marked in dark gray are transmitted as specified in ITI TF-2: Appendix O.  Items in bold black text are further constrained by this profile in this interaction.  This message wrapper is similar to the transmission wrapper used for the same interaction in {{ILink|PCC-9|PCC-1}}, save that the acceptAckCode is different.
 
 
<font color='#808080'><font color='black'>'''<QUPC_IN043200UV xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0"'''
 
                '''xmlns:xsi="<nowiki>http://www.w3.org/2001/XMLSchema-instance</nowiki>">'''</font>
 
  <id root=' ' extension=' '/>
 
  <creationTime value=' '/>
 
  <font color='black'>'''<interactionId extension='QUPC_IN043200UV' root='2.16.840.1.113883.5'/>'''</font>
 
  <processingCode code='D|P|T'/>
 
  <font color='black'>'''<processingModeCode code='T'/>'''
 
  '''<acceptAckCode code='<u>AL</u>'/>'''</font>
 
  <receiver typeCode="RCV">
 
    <device determinerCode="INSTANCE">
 
      <id/>
 
      <name/>
 
      <telecom value=' ' />
 
      <manufacturerModelName/>
 
      <softwareName/>
 
    </device>
 
  </receiver>
 
  <sender typeCode="SND">
 
    <device determinerCode="INSTANCE">
 
      <id/>
 
      <name/>
 
      <telecom value=' ' />
 
      <manufacturerModelName/>
 
      <softwareName/>
 
    </device>
 
  </sender>
 
  <controlActProcess>
 
  ''See Control Act Wrapper below''
 
  </controlActProcess>
 
</QUPC_IN043200UV></font>
 
====== <QUPC_IN043200UV xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0" xmlns:xsi="<nowiki>http://www.w3.org/2001/XMLSchema-instance</nowiki>"> ======
 
The HL7 Interaction being sent will control the name of the root element in the message. The namespace of this message shall be urn:hl7-org:v3, and the ITSVersion attribute shall be "XML_1.0".
 
====== <interactionId extension='QUPC_IN043200UV' root='2.16.840.1.113883.5'/> ======
 
The identifer for the interaction shall be sent as shown above.
 
====== <processingModeCode code='T'/> ======
 
The processingModeCode distinguishes the type of processing being performed. This element shall be present and have the value shown above to indicate that this message is for current processing.
 
====== <acceptAckCode code='AL'/> ======
 
The acceptAckCode indicates whether the reciever wants to recieve an acknowledgement, and shall be sent as shown above.  Query responses in this transaction shall require an acknowledgement.
 
 
===== Control Act Wrapper=====
 
The control act wrapper MFMI_MT700712UV01 provides information about the business actors related to the transaction, including the author or performer of the act.  Control act wrappers are further described in ITI TF-2: Appendix O.
 
An example transmission wrapper is given below for this interaction.  Items marked in dark gray are transmitted as specified in ITI TF-2: Appendix O.  Items in bold black text are further constrained by this profile in this interaction.
 
 
<font style='color:black; font-weight:bold'><controlActProcess moodCode="EVN">=
 
  <font style='color: #808080; font-weight: normal'><id root=' ' extension=' '/></font>
 
  <code code='QUPC_TE043200UV'/>
 
  <font style='color: #808080; font-weight: normal'><effectiveTime value=' '/>
 
  <languageCode code=' '/>
 
  <authorOrPerformer typeCode=' '></authorOrPerformer></font>
 
  <!-- Returning Results -->
 
  <subject>
 
      See Query Response below
 
  </subject>
 
  <queryAck>
 
    <queryId root=' ' extension=' '/>
 
    <statusCode code=' '/>
 
    <queryResponseCode code=' '/>
 
    <resultCurrentQuantity value=' '/>
 
    <resultRemainingQuantity value=' '/>
 
  </queryAck>
 
</controlActProcess></font>
 
 
====== <controlActProcess moodCode="EVN"> ======
 
The controlActProcess element is where information about the business act being performed is recorded. The moodCode is set to "EVN" by the sender to indicate a response to a query. 
 
====== <code code='QUPC_TE043200UV'/> ======
 
The trigger event which caused the act to be transmitted is recorded in the code element is recorded as shown above.
 
====== <subject> ======
 
The <subject> element shall be present to record the responses in a query request or continuation response.
 
====== <queryAck> ======
 
The queryAck element is transmitted in any message that is a response to a query, query continuation or query cancellation message.
 
====== <queryId root=' ' extension=' '/> ======
 
The <queryId> element shall be transmitted in a queryAck element. It shall contain an identifier that was used in the original query message.
 
====== <statusCode code=' '/> ======
 
The statusCode element in the queryAck element indicates the status of the query. It may contain the value 'deliveredResponse' or 'aborted'. If the value is 'aborted', no additional messages should be sent to the data repository for the specified query.
 
====== <queryResponseCode code=' '/> ======
 
The queryResponseCode element indicates at a high level the results of performing the query. It may have the value 'OK' to indicate that the query was performed and has results. It may have the value 'NF' to indicate that the query was performed, but no results were located. It may have the value 'QE' to indicate that an error was detected in the incoming query message, or 'AE' to indicate some other application error occurred.
 
====== <resultCurrentQuantity value=' '/> ======
 
The resultCurrentQuantity element shall be present, and shall enumerate number of results returned in the current response.
 
====== <resultRemainingQuantity value=' '/> ======
 
This resultRemainingQuantity element may be present. It shall enumerate the number of additional results known to follow the results currently returned.  Because these queries have long lifetimes, additional results may be added at any time.
 
 
===== Query Response =====
 
The <subject> element of the <controlActProcess> element shall appear as shown in the example below. 
 
<pre>
 
<subject>
 
  <registrationEvent>
 
    <statusCode code='active'/>
 
    <custodian>
 
      <assignedEntity>
 
        <id root='' extension=''/>
 
        <addr></addr>
 
        <telecom></telecom>
 
        <assignedOrganization>
 
          <name></name>
 
        </assignedOrganization>
 
      </assignedEntity>
 
    </custodian>
 
    <subject2>
 
      <careProvisionEvent>
 
        <recordTarget>
 
          <patient>
 
            <id root='' extension=''/>
 
            <addr></addr>
 
            <telecom value='' use=''/>
 
            <statusCode code='active'/>
 
            <patientPerson>
 
              <name></name>
 
              <administrativeGenderCode code='' displayName=''
 
                codeSystem='2.16.840.1.113883.5.1' codeSystemName='AdministrativeGender'/>
 
              <birthTime value=''/>
 
            </patientPerson>
 
          </patient>
 
        </recordTarget>
 
        <pertinentInformation3>
 
          <!-- Domain Content -->
 
        </pertinentInformation3>
 
      </careProvisionEvent>
 
    </subject2>
 
  </registrationEvent>
 
</subject>
 
</pre>
 
 
====== <subject>======
 
The <subject> element shall be present, and is where the results are returned.
 
====== <registrationEvent>======
 
At least one <registrationEvent> element shall be be present for each set of records returned from a different custodial source or patient (in the case of population queries).
 
 
The <registrationEvent> is used to record the information about how the <careProvisionEvent> being returned was recorded or "registered" in the custodial system.  The response to a Care Profile query is a CareProvisionEvent that is constructed in response to the query.  This <careProvisionEvent> is transitory in nature, and is has limited "registration" information content.
 
 
A Data Repository that aggregates information from two or more other data repositories shall separate the information into multiple <registrationEvent> elements so as to record the different custodians of the information.
 
 
====== <statusCode code='active'/>======
 
The <statusCode> element records the status of the data records.  Queries always return active records, not replaced records, so the value of this element shall always be returned as 'active'.  Note that an active record may reference the record that it replaces in the result.  The replaced record so referenced does not count towards the number of results returned.
 
 
====== <custodian>======
 
The <custodian> element records the data repository that is the custodian, or "owner", of the data record.  A Data Repository actor may return records from multiple custodians, but shall separate the data records from each custodian into different <registrationEvent> elements.
 
====== <assignedEntity>======
 
The <assignedEntity> element shall be present, and provides contact and identification information about the <custodian>.
 
====== <id root='&nbsp;' extension='&nbsp;'/>======
 
The <id> element shall be present, and shall uniquely identify the custodian of the data records.
 
====== <addr></addr>======
 
The <addr> element shall be present, and shall provide a postal address for the custodian of the data records.
 
====== <telecom></telecom>======
 
At least one <telecom> element shall be present that provides a telephone number to contact the custodian of the data records.
 
A <telecom> element may be present that provides the web service end-point address of the custodian of the data records.
 
{{Note|How might the web service end-point address be used?  Is it a good idea to include it, or should we omit this from the profile?|For Public Comment}}
 
====== <assignedOrganization><br/>&nbsp;<name></name><br/></assignedOrganization>======
 
The name of the organization that is the custodian of the data records shall be provided.
 
====== <subject2>======
 
The <subject2> element provides the data content requested from the query.
 
====== <careProvisionEvent>======
 
The <careProvisionEvent> elements returned by the Care Record Profile Query are compositions based upon the information requested in the query.  It is transitory in nature, and does not necessarily coorespond to a single care provision activity stored within the data repository.
 
====== <recordTarget>======
 
The <recordTarget> element records information about the patient for whom the Data Repository is returning results.
 
====== <patient>======
 
The <patient> element contains information identifying the patient and providing contact information.
 
====== <id root='&nbsp;' extension='&nbsp;'/>======
 
At least one <id> element shall be present that identifies the patient.  This <id> element shall be the same as the value of the <patientId> passed in the query.  Other <id> elements may be present.
 
====== <addr></addr>======
 
At least one <addr> element shall be present to provide a postal address for the patient.  It may have the nullFlavor attribute set to UNK if unknown (e.g., for a repository that contains pseudonomized information), or set to MSK for repositories that may contain the information, but which do not choose to divulge the information (e.g., due to access permissions, et cetera).
 
====== <telecom value='&nbsp;' use='&nbsp;'/>======
 
At least one <telecom> element shall be present to provide a telephone number to contact the patient.  It may have the nullFlavor attribute set to UNK if unknown (e.g., for a repository that contains pseudonomized information), or set to MSK for repositories that may contain the information, but which do not choose to divulge the information (e.g., due to access permissions, et cetera).  Other <telecom> elements may be present to contain other contact methods, e.g., e-mail.  One cannot determine from a <telecom> element with the nullFlavor attribute whether it is supposed to contain a telephone number, e-mail address, URL, or other sort of telecommunciations address.  Due to this limitation, the assumption will be made that a <telecom> element with a nullFlavor attribute represents a telephone number that is unavailable. 
 
====== <statusCode code='normal'/>======
 
The <statusCode> element shall be present, and shall be represented exactly as shown above.  This indicates that the ''role'' of patient is in one of the normal states, e.g., has not been explicitly removed or "nullified".
 
====== <patientPerson>======
 
The <patientPerson> element shall be present, and provides further identification information about the patient.
 
====== <name></name>======
 
The <name> element shall be present, and normally provides the patient's name.  The <name> element may have the nullFlavor attribute set to UNK if unknown (e.g., for a repository that contains pseudonomized information), or set to MSK for repositories that may contain the information, but which do not choose to divulge the information (e.g., due to access permissions, et cetera). 
 
====== <administrativeGenderCode code='&nbsp;' displayName='&nbsp;'<br/>&nbsp;codeSystem='2.16.840.1.113883.5.1' codeSystemName='AdministrativeGender'/>======
 
The <administrativeGenderCode> element shall be present, and normally provides the patient's gender using the HL7 [http://www.hl7.org/v3ballot/html/infrastructure/vocabulary/AdministrativeGender.htm AdministrativeGender] vocabulary.  The <administrativeGender> element may have the nullFlavor attribute set to UNK if unknown (e.g., for a repository that contains pseudonomized information), or set to MSK for repositories that may contain the information, but which do not choose to divulge the information (e.g., due to access permissions, et cetera).
 
====== <birthTime value='&nbsp;'/>======
 
The <birthTime> element shall be present, and normally provides the patient's birthTime.  The <birthTime> element may have the nullFlavor attribute set to UNK if unknown (e.g., for a repository that contains pseudonomized information), or set to MSK for repositories that may contain the information, but which do not choose to divulge the information (e.g., due to access permissions, et cetera).
 
 
====== <pertinentInformation3><br/>&nbsp;&lt;!-- Domain Content><br/><pertinentInformation3> ======
 
This data element shall be present. It shall contain one of the data elements found in the Data Repository that matches the specified query parameters. The content of this data element is a care statement that varies depending upon the specific transaction, and is futher defined in the section on Domain Content.  Each care statement shall have at least one <author> element that indicates to whom the care statement is attributed.  Each care statement may have zero or more <informant> elements that indicates who provided information related to the care statement.  See the section below on Authors and Informants  for more information on how this information should be recorded.
 
 
===== Expected Actions -- Data Repository =====
 
The Data Repository shall send a response as specified in the QUPC_IN043200UV  interaction.  The message shall be sent using web services as specified in the ITI-TF: Appendix V. 
 
===== Expected Actions -- Care Manager =====
 
The Care Manager shall respond with an acknowledgement as specified in the QUPC_IN043200UV  interaction. 
 
 
The name of the query response message shall be QUPC_IN043200UV_Message in the WSDL.
 
The following WSDL snippet defines the type for this message:
 
{|
 
|+Query Response Message Type Definition
 
|-
 
|
 
  <types>
 
    <xsd:schema elementFormDefault="qualified"
 
      targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
 
      <!-- Include the message schema -->
 
      <xsd:import namespace="urn:hl7-org:v3"
 
        schemaLocation="QUPC_IN043200UV.xsd"/>
 
      <xsd:element name="QUPC_IN043200UV"/>
 
    </xsd:schema>
 
  </types>
 
|}
 
{Fixme|Add acknowlegement above and below }}
 
The message type is declared to be of the appropriate type by the following WSDL snippet:
 
{|
 
|+Query Respone Message WSDL Declaration
 
|-
 
|
 
  <message name='QUPC_IN043200UV_Message'>
 
    <part element='hl7:QUPC_IN043200UV' name="Body"/>
 
  </message>
 
|}
 
Other WSDL declarations required for this transaction are defined under the Domain Content section.
 
 
====== Response to a New Query ======
 
The Data Repository, shall:
 
# Recieve and validate the query message.
 
# Create the response message.
 
# Add an ILLEGAL detected issue alert to the response message if the content is invalid (e.g., does not pass schema validation or is otherwise malformed), and immediately return a response indicating the error, and that the query was aborted.  Set the text of the alert to the name of the first data element that is not valid.  The Data Repository may send more than one ILLEGAL detected issue alert if it is able to determine that multiple data elements in the query are not valid.
 
# Add a NAT detected issue alert to the response message if the requesting party is not authorized to perform the query, and immediately return a response indicating the error, and that the query was aborted.
 
# Add a VALIDAT detected issue alert to the response message for each of the patientName, patientGenderCode or patientBirthTime fields specified in the query that do not match the values known by the Clinical Data Repository Actor.  The text value on the alert shall be set to the name of the parameter that does not match (patientName, patientGenderCode or patientBirthTime).
 
# Add a BUS detected issue alert to the response message if includeCarePlanAttachment is true, but care plans are not associated with observation values.  The text value on the alert shall be set to includeCarePlanAttachment.
 
# Add a BUS detected issue alert to the response message if a careProvisionReason value is specified, but the Data Repository cannot query by this field.  The text value on the alert shall be set to careProvisionReason.
 
# Add a KEY204 detected issue alert to the response message if any of the vocabulary domains are not recognized by the Data Repository.  The text value on the alert shall be set to the name of the query parameter that used the unrecognized vocabulary domain.
 
# Add a CODE_INVALID detected issue alert to the response message if any of the codes specified are not recognized by the Data Repository.  The text value on the alert shall be set to the name of the query parameter that used the unrecognized vocabulary domain.
 
# Add a FORMAT detected issue alert to the response message if any date ranges are incorrectly formed (low > high).  The text value on the alert shall be set to the name of the query parameter that has the error.
 
# Add a ILLEGAL detected issue alert to the response message if the the data repository does not recognize the identity domain used to identify the patient.  Set the text value on the alert to patientId.
 
# Add a KEY204 detected issue alert to the response message if the the data repository does not know about the patient.  Set the text value on the alert to patientId.  This is distinct from having nothing to report.  If the patient is recognized but there is no data to report, the result returned should simply have no data.  However, if information is requested for a patient that isn't known, then the KEY204 alert shall be raised.
 
# Add an appropriate detected issue alert if any parameters otherwise not specified by this profile have been provided, but are not supported by the Data Repository.
 
# If any issues were detected, Set queryAck/statusCode/@code to aborted, and queryAct/queryResponse/@code to QE, and return the response.
 
# Add an ISSUE alert to the response message if at any time during response generation, an application error occurs that prevents further processing.  Set the text of the alert to the reason for the application error (e.g., a stack trace or exception message).  Set queryAct/statusCode/@code to aborted, and queryAct/responseCode/@code to AE, and return the response.
 
# Query for the data requested by the query.
 
# If results are found, set queryAct/queryResponse/@code to OK, otherwise set it to NF.
 
# Set queryAck/statusCode/@code to deliveredResponse.
 
# Add any results to the response up to the maximum number of history statements requested.
 
# If all results have been returned, release the query results.
 
 
A conforming Data Repository shall support those parameters that have an R in the Repository column from the table above, and need not support those query parameters that have an O in this column.
 
 
====== Response to a Query Continuation ======
 
The Data Repository, shall:
 
# Recieve and validate the query continuation message.
 
# Add an ILLEGAL detected issue alert to the response message if the content is invalid (e.g., does not pass schema validation or is otherwise malformed), and immediately return a response indicating the error, and that the query was aborted. Set the text of the alert to the name of the first data element that is not valid. The Data Repository may send more than one ILLEGAL detected issue alert if it is able to determine that multiple data elements in the continuation are not valid.
 
# Create the response message.
 
# Add a KEY204 detected issue alert to the response message if the the data repository does not recognize the queryId.
 
# Add a VALIDAT detected issue alert to the response message if the query was previously aborted or otherwise terminated.
 
# Add an appropriate detected issue alert if any parameters otherwise not specified by this profile have been provided, but are not supported by the Data Repository.
 
# If any issues were detected, Set queryAck/statusCode/@code to aborted, and queryAct/queryResponse/@code to QE, and return the response.
 
# Add an ISSUE alert to the response message if at any time during response generation, an application error occurs that prevents further processing. Set the text of the alert to the reason for the application error (e.g., a stack trace or exception message). Set queryAct/statusCode/@code to aborted, and queryAct/responseCode/@code to AE, and return the response.
 
# Scroll to the result requested in queryContinuation/startResultNumber, querying additional data if necessary.
 
# If more results are found, set queryAct/queryResponse/@code to OK, otherwise set it to NF.
 
# If no more results are found, ensure that the queryAck/resultTotalQuantity indicates the toal number of results found.
 
# Set queryAck/statusCode/@code to deliveredResponse.
 
# Add any results to the response up to the maximum number of history statements requested.
 
# Return the response message.
 
# Release query results if no additional messages on the query are recieved within an application configurable timeout value.
 
 
====== Response to a Query Cancel ======
 
The Data Repository, shall:
 
# Recieve and validate the query cancelation message.
 
# Create the response message.
 
# Add an ILLEGAL detected issue alert to the response message if the content is invalid (e.g., does not pass schema validation or is otherwise malformed), and immediately return a response indicating the error, and that the query was aborted. Set the text of the alert to the name of the first data element that is not valid. The Data Repository may send more than one ILLEGAL detected issue alert if it is able to determine that multiple data elements in the cancellation are not valid.
 
# Add a KEY204 detected issue alert to the response message if the the data repository does not recognize the queryId.
 
# Add an appropriate detected issue alert if any parameters otherwise not specified by this profile have been provided, but are not supported by the Data Repository.
 
# Add an ISSUE alert to the response message if at any time during response generation, an application error occurs that prevents further processing. Set the text of the alert to the reason for the application error (e.g., a stack trace or exception message).
 
# Set queryAck/statusCode/@code to aborted,
 
# If any application errors were detected, set the queryAct/queryResponse/@code to AE, otherwise, if any other issues were detected, set the value to QE, otherwise set it to NF.
 
# Return the response message.
 
# Release query results.
 
 
====== Raising Alerts ======
 
If the content of the request is not valid (e.g., according to the Schema or the rules of this profile), at least on ILLEGAL alert shall be raised indicating the data element that was invalid.  A response will be sent indicating that the request was invalid, and no further processing shall be performed.
 
 
If the requesting party is not authorized to perform the query, the minimum response shall be sent indicating only that the requested is not authorized to perform the query. 
 
 
In other cases, all possible alerts shall be accumulated before returning a response to the caller. 
 
 
This enables Care Manager actors to send a test query that will enable them to verify the vocabulary and other request parameters that are desired.
 
 
An alert is raised by sending a response containing one or more <reasonOf> elements, coded as shown below.
 
<pre>
 
<reasonOf>
 
  <detectedIssueEvent>
 
    <code code='' displayName='' codeSystem='' codeSystemName=''/>
 
    <text></text>
 
    <mitigatedBy>
 
      <detectedIssueManagement moodCode="RQO">
 
        <code code='' displayName='' codeSystem='' codeSystemName=''/>
 
        <text></text>
 
      </detectedIssueManagement>
 
    </mitigatedBy>
 
  </detectedIssueEvent>>
 
</reasonOf>
 
</pre>
 
 
====== <reasonOf> ======
 
The <reasonOf> element is required to indicate that an alert has occured.
 
 
====== <detectedIssueEvent> ======
 
The details of the alert shall be present in the <detectedIssueEvent> element.
 
 
====== &lt;code code='&nbsp;' displayName='&nbsp;' codeSystem='2.16.840.1.113883.5.4' codeSystemName='ActCode'/> ======
 
The &lt;code> element shall contain ISSUE or one of its descendants from the HL7 [http://www.hl7.org/v3ballot/html/infrastructure/ActCode.htm#ISSUE ActCode] vocabulary.
 
 
====== <text></text> ======
 
If a validation or other business rule error occurred, the erroneous parameter shall be identified in <text> element using the element name, and nothing else should be present.
 
 
If an application error occured, the <text> element shall contain diagnostic information (e.g., stack trace or exception message).
 
 
If the reason for the alert was an unrecognized code (CODE_INVALID), the text element shall contain the name of the erroneous parameter, and may contain a space separated list of OIDs identifying value sets which would be valid.
 
 
If the reason for the alert was an unrecognized identifier (KEY204) for the vocabulary used in the careProvisionCode or careProvisionReason element, the text element shall contain the name of the erroneous paramater, and may contain a space separated list of the OIDs for code systems which would be valid.
 
 
===== Expected Actions -- Care Manager =====
 
The Care Manager processes the query response data.  If the response indicates that more data is available, the Care Manager can request additional data using the General Query Activate Query Continue message, indicating which data is being requested.
 
 
==== General Query Activate Query Continue ====
 
{{Note|Do we need this?  If not, how will the Care Manager handle "flow control"?  Control-S and Control-Q just doesn't seem to cut it}}
 
 
===== Trigger Events =====
 
When a Care Manager needs to obtain more results from a query, it will trigger the continuation of the query. This cooresponds the the HL7 trigger event: [http://www.hl7.org/v3ballot/html/domains/uvqi/uvqi_QueryByParameter.htm#QUQI_TE000003UV01-te QUQI_TE000003UV01]
 
 
===== Message Semantics =====
 
The Query Care Record Event Profile Query corresponds to the HL7 Interaction QUQI_IN000003UV01.  A schema for this interaction can be found at: http://www.hl7.org/v3ballot2007may/html/processable/multicacheschemas/QUQI_IN000003UV01.xsd.  This schema includes:
 
* the transmission wrapper MCCI_MT000300UV01, and
 
* the control act wrapper  QUQI_MT000001UV01.
 
These components of the interaction are specified in the HL7 standards described above.
 
====== Transmission Wrapper======
 
The transmission wrapper MCCI_MT000300UV01 provides information about the message transmission and routing.  Transmission wrappers are further described in ITI TF-2: Appendix O.
 
An example transmission wrapper is given below for this interaction.  Items marked in dark gray are transmitted as specified in ITI TF-2: Appendix O.  Items in bold black text are further constrained by this profile in this interaction.
 
<font color='#808080'><font color='black'>'''<QUQI_IN000003UV01 xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0"'''
 
                '''xmlns:xsi="<nowiki>http://www.w3.org/2001/XMLSchema-instance</nowiki>">'''</font>
 
  <id root=' ' extension=' '/>
 
  <creationTime value=' '/>
 
  <font color='black'>'''<interactionId extension='QUQI_IN000003UV01' root='2.16.840.1.113883.5'/>'''</font>
 
  <processingCode code='D|P|T'/>
 
  <font color='black'>'''<processingModeCode code='T'/>'''
 
  '''<acceptAckCode code='AL'/>'''</font>
 
  <receiver typeCode="RCV">
 
    <device determinerCode="INSTANCE">
 
      <id/>
 
      <name/>
 
      <telecom value=' ' />
 
      <manufacturerModelName/>
 
      <softwareName/>
 
    </device>
 
  </receiver>
 
  <sender typeCode="SND">
 
    <device determinerCode="INSTANCE">
 
      <id/>
 
      <name/>
 
      <telecom value=' ' />
 
      <manufacturerModelName/>
 
      <softwareName/>
 
    </device>
 
  </sender>
 
  <controlActProcess>
 
  ''See Control Act Wrapper below''
 
  </controlActProcess>
 
</QUQI_IN000003UV01></font>
 
====== <QUQI_IN000003UV01 xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0" xmlns:xsi="<nowiki>http://www.w3.org/2001/XMLSchema-instance</nowiki>">======
 
The HL7 Interaction being sent will control the name of the root element in the message. The namespace of this message shall be urn:hl7-org:v3, and the ITSVersion attribute shall be "XML_1.0".
 
====== <interactionId extension='QUQI_IN000003UV01' root='2.16.840.1.113883.5'/> ======
 
The identifer for the interaction shall be sent as shown above.
 
====== <processingModeCode code='T'/> ======
 
The processingModeCode distinguishes the type of processing being performed. This element shall be present and have the value shown above to indicate that this message is for current processing.
 
====== <acceptAckCode code='AL'/> ======
 
The acceptAckCode indicates whether the sender wants to recieve an acknowledgement, and shall be sent as shown above.
 
===== Control Act Wrapper =====
 
The control act wrapper QUQI_MT020001UV01 provides information about the business actors related to the transaction, including the author or performer of the act.  Control act wrappers are further described in ITI TF-2: Appendix O.
 
An example transmission wrapper is given below for this interaction.  Items marked in gray are transmitted as specified in ITI TF-2: Appendix O.  Items in bold black text are further constrained by this profile in this interaction.
 
<font style='color: black; font-weight: bold;'><controlActProcess moodCode="RQO">
 
  <font style='color: #808080; font-weight: normal;'><id root=' ' extension=' '/></font>
 
  <code code='QUQI_TE000003UV01'/>
 
  <font style='color: #808080; font-weight: normal;'><effectiveTime value=' '/>
 
  <languageCode code=' '/>
 
  <authorOrPerformer typeCode=' '></authorOrPerformer></font>
 
  <!-- Requesting more results -->
 
  <queryContinuation>
 
    <queryId root=' ' extension=' '/>
 
    <statusCode code='waitContinuedQueryResponse'/>
 
    <startResultNumber value=' '/>
 
    <continuationQuantity value=' '/>
 
  </queryContinuation>
 
</controlActProcess></font>
 
====== <controlActProcess moodCode="RQO"> ======
 
The controlActProcess element is where information about the business act being performed is recorded. The moodCode is set to "RQO" by the sender to indicate a request to perform an action, in this case, a continuation of a query. 
 
====== <code code='QUQI_TE000003UV01'/> ======
 
The trigger event which caused the act to be transmitted is recorded in the code element is recorded as shown above.
 
incoming query message, or 'AE' to indicate some other application error occurred.
 
===== Continuation Request =====
 
====== <queryContinuation>====== 
 
The queryContinuation element shall be sent in messages that are used to obtain more query results or cancel a current query.
 
====== <queryId root=' ' extension=' '/> ======
 
The identifier of the query to continue or cancel shall be reported in the queryId element.
 
====== <statusCode code='waitContinuedQueryResponse'/>====== 
 
The statusCode element shall be sent, and indicates that this is a continuation of the query.
 
====== <startResultNumber value=' '/> ======
 
The startResultNumber element may be sent to indicate the query result to start returning from. If this element is sent, it shall be honored by the data repository. If this element is omitted, results will be sent that follow the last set of results sent. Results are numbered from 1, so setting this value to 1 will start with the first result returned. Setting this value to a number less than 1 will result in undefined application behavior.
 
====== <continuationQuantity value=' '/>====== 
 
The continuationQuantity element may be sent on continuation requests to indicate the number of addition records to return.  If sent it shall have a value greater than 0. The data repository may send fewer results than requested, but shall send no more than this value.
 
 
===== Expected Actions -- Care Manager =====
 
Upon completion of all result processing, the Care Manager shall send a General Query Query Activate Continue message to obtain additional results.
 
 
The Data Repository shall send a response as specified in the [http://www.hl7.org/v3ballot/html/domains/domains/uvqi/uvqi_QueryByParameter.htm#QUQI_IN000003UV01-int QUQI_IN000003UV01] interaction.  The message shall be sent using web services as specified in the ITI-TF: Appendix V.
 
 
 
The name of the query response message shall be QUQI_IN000003UV01_Message in the WSDL.
 
The following WSDL snippet defines the type for this message:
 
{|
 
|+Query Response Message Type Definition
 
|-
 
|
 
  <types>
 
    <xsd:schema elementFormDefault="qualified"
 
      targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
 
      <!-- Include the message schema -->
 
      <xsd:import namespace="urn:hl7-org:v3"
 
        schemaLocation="QUQI_IN000003UV01.xsd"/>
 
      <xsd:element name="QUQI_IN000003UV01"/>
 
    </xsd:schema>
 
  </types>
 
|}
 
The message type is declared to be of the appropriate type by the following WSDL snippet:
 
{|
 
|+Query Respone Message WSDL Declaration
 
|-
 
|
 
  <message name='QUQI_IN000003UV01_Message'>
 
    <part element='hl7:QUQI_IN000003UV01' name="Body"/>
 
  </message>
 
|}
 
Other WSDL declarations required for this transaction are defined under the Domain Content section.
 
 
==== General Query Query Cancel ====
 
 
===== Trigger Events =====
 
When the Care Manager is finished with the query, it shall cancel the query.  This cooresponds the the HL7 trigger event:[http://www.hl7.org/v3ballot/html/domains/uvqi/uvqi_QueryByParameter.htm#QUQI_TE000003UV01-te QUQI_TE000003UV01] -- General Query Activate Query Continue
 
 
===== Message Semantics =====
 
The Query Care Record Event Profile Query Cancel corresponds to the HL7 Interaction QUQI_IN000003UV01.  A schema for this interaction can be found at: http://www.hl7.org/v3ballot2007may/html/processable/multicacheschemas/QUQI_IN000003UV01.xsd.  This schema includes:
 
* the transmission wrapper MCCI_MT000300UV01, and
 
* the control act wrapper  QUQI_MT000001UV01.
 
These components of the interaction are specified in the HL7 standards described above.
 
===== Transmission Wrapper =====
 
The transmission wrapper MCCI_MT000300UV01 provides information about the message transmission and routing.  Transmission wrappers are further described in ITI TF-2: Appendix O.  The transmission wrapper used in the Query Cancel message is the same as the transmission wrapper used in the Query Continuation message described in the previous section.
 
===== Control Act Wrapper =====
 
The control act wrapper QUQI_MT020001UV01 provides information about the business actors related to the transaction, including the author or performer of the act.  Control act wrappers are further described in ITI TF-2: Appendix O.
 
 
An example transmission wrapper is given below for this interaction.  Items marked in gray are transmitted as specified in ITI TF-2: Appendix O.  Items in bold black text are further constrained by this profile in this interaction.
 
 
<font style='color: black; font-weight: bold;'><controlActProcess moodCode="RQO">
 
  <font style='color: #808080; font-weight: normal;'><id root=' ' extension=' '/></font>
 
  <code code='QUQI_TE000003UV01'/>
 
  <font style='color: #808080; font-weight: normal;'><effectiveTime value=' '/>
 
  <languageCode code=' '/>
 
  <authorOrPerformer typeCode=' '></authorOrPerformer></font>
 
  <!-- Cancelling a query -->
 
  <queryContinuation>
 
    <queryId root=' ' extension=' '/>
 
    <statusCode code='aborted'/>
 
    <strike><startResultNumber value=' '/></strike>
 
    <continuationQuantity value='0'/>
 
  </queryContinuation>
 
</controlActProcess></font>
 
 
====== <controlActProcess moodCode="RQO"> ======
 
The controlActProcess element is where information about the business act being performed is recorded. The moodCode is set to "RQO" by the sender to indicate a request to perform an action, in this case, a continuation of a query. 
 
====== <code code='QUQI_TE000003UV01'/> ======
 
The trigger event which caused the act to be transmitted is recorded in the code element is recorded as shown above.
 
incoming query message, or 'AE' to indicate some other application error occurred.
 
===== Cancellation Request=====
 
====== <queryContinuation> ======
 
The queryContinuation element shall be sent in messages that are used to obtain more query results or cancel a current query.
 
====== <queryId root=' ' extension=' '/> ======
 
The identifier of the query to continue or cancel shall be reported in the <queryId> element.
 
====== <statusCode code='aborted'/> ======
 
The statusCode element shall be sent as shown above, and indicates that this is a continuation of the query.
 
====== <strike><startResultNumber value=' '/></strike>====== 
 
The startResultNumber element shall not be sent in a cancellation request.
 
====== <continuationQuantity value=' 0'/> ======
 
The continuationQuantity element shall be sent and shall have a value 0 to indicate a cancellation.
 
===== Expected Actions -- Care Manager =====
 
When finished with all query results, the Care Manager shall send a General Query Query Cancel message to cancel the query.
 
 
The name of the query response message shall be QUQI_IN000003UV01_Message in the WSDL, and this is declared as shown above for the Query Continue message. Other WSDL declarations required for this transaction are defined under the Domain Content section.
 
 
===== Expected Actions -- Clinical Data Source =====
 
The Clinical Data Source shall respond to the Cancellation message with an acknowledgement.
 
 
=== Domain Content ===
 
This section lists the requirements specific to the Query Vital Signs transaction. 
 
 
{{Note|Implementors of a Clinical Data Repository Actor, or a Care Manager Actor shall publish an [http://www.hl7.org/v3ballot/html/infrastructure/conformance/conformance.htm#v3gconfclaims HL7 Conformance Profile] that indicates the vocabularies and code sets that they support for this transaction.}}
 
==== Get Care Record Profile Query ====
 
===== careProvisionCode =====
 
A Care Manager may specify the value COBSCAT from the from the HL7 ActCode vocabulary (2.16.840.1.113883.5.4) domain to obtain all matching observations that coorespond to the LOINC code values from the table in {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13.2|Vital Signs Observation}} reproduced below.  A Care Manager may use any of the LOINC code values from this table to obtain any specific vital sign result.
 
{{:1.3.6.1.4.1.19376.1.5.3.1.4.13.2/Vital Signs Codes}}
 
 
A Care Manager Actor may make requests using other codes to obtain other common observations, but these are not guaranteed to be available in all cases.  For example, a Care Manager might use values from the table in {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13.5|Pregnancy Observations}}.
 
 
As a rule of thumb, if it is a measurement that does not require special diagnosic equipment to be performed, or a value that may be reported by a patient that is not indicitive on its own as a medical condition, then it can be considered to be a common observation.  Other common observations that may be included are measures such as glucometer readings, date of last menstruation (e.g., as would be used to estimate date of delivery during perinatal care), et cetera.  A specific lab result would not be obtained using this transaction, nor would patient risk factors (e.g. ETOH (Alcohol) use), or the presence of any specific problems.
 
 
==== Get Care Record Profile Response ====
 
A Clinical Data Repository Actor shall respond to a query request by returning clinical statements that are returned within <pertinentInformation3> data elements.
 
 
When careProvisionCode is set to COBSCAT from the HL7 ActCode vocabulary domain, the Vital Signs Repository shall respond by returning all matching observations that coorespond to the LOINC code values from the table in {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13.2|Vital Signs Observation}}.  It shall also respond to any of the individual LOINC codes found in that table to return specific kinds of vital signs measurements.  The observations returned shall conform the the PCC {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13.2|Vital Signs Observation}} entry template.
 
 
A Clinical Data Repository Actor may respond to a query request where the LOINC code matches any individual LOINC code found in the table in the {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13.5|Pregnancy Observations}} with clinical statements conforming to that entry template.
 
 
A Clinical Data Repository Actor may respond to requests using other LOINC codes to return other common observations.  These observations shall conform to the {{ILink|PCC-9|1.3.6.1.4.1.19376.1.5.3.1.4.13|Simple Obervations}} entry template.
 
 
All observations returned shall specify the author or authors of the observation in an <author> element, and may indicate the informants in <informant> elements.
 
  
 
==== WSDL Declarations ====
 
==== WSDL Declarations ====
{{:PCC-9/WSDL|1|VitalSigns|Vital Signs}}
+
{{:PCC-9/WSDL|1|CareManager|Care Manager}}

Revision as of 08:12, 21 May 2008

Care Management Data Query

This section corresponds to Transaction PCC-9 of the IHE Patient Care Coordination Technical Framework. Transaction PCC-9 is used by the Care Manager and Clinical Data Repository Actors.

Transaction PCC-9 is a variation of the pattern used in transaction PCC-1 of the PCC Technical Framework. Information specific to this transaction is described in futher detail below in the section on Domain Content.

Use Case Roles

Care Manager   Clinical Data Repository
Usecase.png
Care Management Data Query
Actor
Care Manager
Role
Requests a collection of clinical data matching the selection criteria from the Clinical Data Repository.
Cooresponding HL7 Version 3 Application Roles
Care Record Query Placer (QUPC_AR004030UV)
Query by Parameter Placer (QUQI_AR000001UV01)
Actor
Clinical Data Repository
Role
Returns clinical data matching the selection criteria supplied by the Care Manager.
Cooresponding HL7 Version 3 Application Roles
Care Record Query Fulfiller (QUPC_AR004040UV)
Query by Parameter Fulfiller (QUQI_AR000002UV01)


Referenced Standards

CareRecord HL7 Care Provision Care Record (DSTU)
CareQuery HL7 Care Provision Care Record Query (DSTU)
HL7QI HL7 Version 3 Standard: Infrastructure Management – Query Infrastrucure
HL7WS HL7 Version 3 Standard: Transport Specification - Web Services Profile, Release
SOAP Simple Object Access Protocol Version 1.1 (SOAP 1.1)
SOAP12 Simple Object Access Protocol Version 1.2 (SOAP 1.2)

Interaction Diagrams

This text needs to be fixed-->>Need to fix this picture<<-- Qcdpmo.png

Get Care Record Profile Query

Trigger Events

When the Care Manager needs to obtain information about a patient or population it will trigger a Get Care Record Care Profile event. This cooresponds to the HL7 trigger event: QUPC_TE043100UV

Message Semantics

The Query Care Record Event Profile Query corresponds to the HL7 Interaction QUPC_IN043100UV.

A schema for this interaction can be found at: http://www.hl7.org/v3ballot2007may/html/processable/multicacheschemas/QUPC_IN043100UV.xsd. This schema includes:

  • the transmission wrapper MCCI_MT000100UV01,
  • the control act wrapper QUQI_MT020001UV01, and
  • the message payload QUPC_MT040100UV.

These components of the interaction are specified in the HL7 standards described above.

Transmission Wrapper

The transmission wrapper for PCC-9 is identical to the transmission wrapper used in PCC-1, and appears below.

The transmission wrapper MCCI_MT000100UV01 provides information about the message transmission and routing. Transmission wrappers are further described in ITI TF-2: Appendix O. An example transmission wrapper is given below for this interaction. Items marked in dark gray are transmitted as specified in ITI TF-2: Appendix O. Items in bold black text are further constrained by this profile in this interaction.

<QUPC_IN043100UV xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <id root=' ' extension=' '/>
 <creationTime value=' '/>
 <interactionId extension='QUPC_IN043100UV' root='2.16.840.1.113883.5'/>
 <processingCode code='D|P|T'/>
 <processingModeCode code='T'/>
 <acceptAckCode code='AL'/>
 <receiver typeCode="RCV">
   <device determinerCode="INSTANCE">
     <id/>
     <name/>
     <telecom value=' ' />
     <manufacturerModelName/>
     <softwareName/>
   </device>
 </receiver>
 <sender typeCode="SND">
   <device determinerCode="INSTANCE">
     <id/>
     <name/>
     <telecom value=' ' />
     <manufacturerModelName/>
     <softwareName/>
   </device>
 </sender>
 <controlActProcess>
  See Control Act Wrapper below
 </controlActProcess>
</QUPC_IN043100UV>
<QUPC_IN043100UV xmlns="urn:hl7-org:v3" ITSVersion="XML_1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

The HL7 Interaction being sent will control the name of the root element in the message. The namespace of this message shall be urn:hl7-org:v3, and the ITSVersion attribute shall be "XML_1.0".

<interactionId extension='QUPC_IN043100UV' root='2.16.840.1.113883.5'/>

The identifer for the interaction shall be sent as shown above.

<processingModeCode code='T'/>

The processingModeCode distinguishes the type of processing being performed. This element shall be present and have the value shown above to indicate that this message is for current processing.

<acceptAckCode code='AL'/>

The acceptAckCode indicates whether the sender wants to recieve an acknowledgement, and shall be sent as shown above.


Control Act Wrapper

The control act wrapper QUQI_MT020001UV01 provides information about the business actors related to the transaction, including the author or performer of the act. Control act wrappers are further described in ITI TF-2: Appendix O. An example transmission wrapper is given below for this interaction. Items marked in dark gray are transmitted as specified in ITI TF-2: Appendix O. Items in bold black text are further constrained by this profile in this interaction. With the exception of the responsePriorityCode, the controlActProcess element defined for this transaction is identical to the same element defined in PCC-1, PCC-2, PCC-3, PCC-4, PCC-5 and PCC-6.

<controlActProcess moodCode="RQO">
  <id root=' ' extension=' '/>
  
  <effectiveTime value=' '/>
  <languageCode code=' '/>
  <authorOrPerformer typeCode=' '></authorOrPerformer>
  
  <queryByParameter>
    <id root=' ' extension=' '/>
    <statusCode code='new'/>
    <responseModalityCode code='R'/>
    <responsePriorityCode code='D'/>
    <initialQuantity value=/>
    <initialQuantityCode code='REPC_RM000100UV' codeSystem='2.16.840.1.113883'/>
    <parameterList>
      see Query Parameter List below
    </parameterList>
  </queryByParameter>
</controlActProcess>
<controlActProcess moodCode="RQO">

The controlActProcess element is where information about the business act being performed is recorded. The moodCode is set to "RQO" by the sender to indicate a request to perform an action, in this case, a query.

The trigger event which caused the act to be transmitted is recorded in the code element is recorded as shown above.

<queryByParameter>

HL7 Version 3 messages that perform a query specify the details of it in the <queryByParameter> element.

<id root=' ' extension=' '/>

The sending system shall specify the identifier of the query. This is the identifierr that is used in subsequent continuation or cancel messages.

<statusCode code='new'/>

When passing the parameter list, the <statusCode> element shall be recorded as above to indicate that this is a new query.

<responseModalityCode code='R'/>

The query response shall always be in real-time.

<responsePriorityCode code='D'/>

The query response shall always be deferred.

<initialQuantityCode code='REPC_RM000100UV' codeSystem='2.16.840.1.113883.5'>

The <initialQuantityCode> shall be sent when <initialQuantity> is sent. The code shall be the identifier of the HL7 artifact that is to be counted (e.g., R-MIM or C-MET identifer). In this profile what is being counted is clinical statements, so the code to use shall be REPC_RM000100UV.

Please note, the initial response to this query may include a large number of clinical statements providing historical data for the patients selected by the query. The use of initialQuantityCode allows the Care Manager to control the amount of historical data that the Clinical Data Source sends.


For Public Comment There is some question here about what to do with the acknowledgement, should it be delayed until the Care Manager has processed or stored the information. What happens with the remaining data? Is a continuation required to be sent to alert the Clinical Data Source that it can send more data?


Parameter List

The parameterList element describes the data being requested. At least one of these elements shall be present in the queryByParameter element. When multiple parameterList elements are included, the data returned by the Clinical Data Repository will concist of all data meeting the criteria in any of the parameterList elements.

The message supports specification of the data items listed in the table below as query parameters. The first column of this table provides the name of the parameter. The next column indicates the number of times it may occur in the query. The next column indicates the type of data expected for the query parameter. The next column indicates the vocabulary domain used for coded values. The Consumer column indicates whether the Care Manager must send this parameter. The Repository column indicates whether the Data Repository must support this parameter.

A Care Manager may supply parameters other than those required by this profile, but must appropriately handle any detected issue alert raised by the Data Repository in its response.

Parameter Name Cardinality Data Type Vocabulary Domain Consumer Repository
Query Parameters
careProvisionCode 0..1 CD   O R
careProvisionReason 0..* CD   O O
careRecordTimePeriod 0..1 IVL<TS>   O R
clinicalStatementTimePeriod 0..1 IVL<TS>   O R
includeCarePlanAttachment 0..1 BL   R R
maximumHistoryStatements 0..1 INT   O R
patientAdministrativeGender 0..1 CE AdministrativeGender O R
patientBirthTime 0..1 TS   O R
patientId 1..1 II   R R
patientName 0..1 PN   O R

An example of the query specification is described in the figure below.

  <parameterList>
    <careProvisionCode>
      <value code='' displayName='' codeSystem='' codeSystemName=''/>
    </careProvisionCode>
    <careProvisionReason>
      <value code='' displayName='' codeSystem='' codeSystemName=''/>
    </careProvisionReason>
    <careRecordTimePeriod>
      <value><low value=''/><high value=''/></value>
    </careRecordTimePeriod>
    <clinicalStatementTimePeriod>
      <value><low value=''/><high value=''/></value>
    </clinicalStatementTimePeriod>
    <includeCarePlanAttachment><value value='true|false'/></includeCarePlanAttachment>
    <maximumHistoryStatements><value value=''/></maximumHistoryStatements>
    <patientAdministrativeGender>
      <value code='' displayName='' 
        codeSystem='2.16.840.1.113883.5.1' codeSystemName='AdministrativeGender'/>
    </patientAdministrativeGender>
    <patientBirthTime><value value=''/></patientBirthTime>
    <patientId><value root='' extension=''/></patientId>
    <patientName><value></value></patientName>
  </parameterList>
<parameterList>

At least one <parameterList> element shall be present, and contains a set of query parameters being used in this query.

<careProvisionCode><value code=' ' displayName=' ' codeSystem=' ' codeSystemName=' '/></careProvisionCode>

This <careProvisionCode> shall be present. This element describes the information that is being looked for in the <value> element.

Specific results or categories of results may be requested using the codes listed in the domain content section below.

<careProvisionReason><value code=' ' displayName=' ' codeSystem=' ' codeSystemName=' '/></careProvisionReason>

This element identifies the reason why the result was recorded. If specified, only those results which are recorded for the specified reason will be returned.

<careRecordTimePeriod><value><low value=' '/><high value=' '/></value></careRecordTimePeriod>

This element describes the time period over which the results were recorded. A query could for example, request new entries that have been processed for this patient since the last query request. If specified, only those results that were authored within the specified time period will be returned.

<clinicalStatementTimePeriod><value><low value=' '/><high value=' '/></value></clinicalStatementTimePeriod>

This element describes the effective time for the clinical statement. If specified, only those results that were effective within the clinical statement effective time will be returned.

The effectiveTime range of the returned clinical statements shall overlap or be wholely contained within the time range described by the <clinicalStatementTimePeriod> element. In the example below, the clinical statements with the effectiveTime values represented by time ranges B, C and D would be returned, while those with effectiveTime values represented by time ranges A and E would not, because they fall outside of the specified <clinicalStatementTimePeriod> value.

Effective Time and Clinical Statement Time Period
<includeCarePlanAttachment><value value='true|false'/></includeCarePlanAttachment>

The <includeCarePlanAttachment> element shall be sent, and must be set to either true or false depending upon whether care plans should be returned or not. A Data Repository may choose not to honor this request when the value is set to true, but must then raise a BUS detected issue alert to indicate that this capability is not supported. Note that many data repositories will not associate a care plan attachment with a specific result.

<maximumHistoryStatements><value value=' '/></maximumHistoryStatements>

This value indicates the maximum number of each type of result that will be returned by the query. No more than the maximum number will be returned. This value is NOT the maximum number of clinical statements returned, rather it is the maximum number of clinical statements returned for individual type of clinical statement specified in the careProvisionCode. Thus, if all results are requested (e.g., all Vital Signs), and maximumHistoryStatements/value/@value = 1, you will receive the most current value for each kind of result requested (e.g., one each of the most recent value for height, weight, blood pressure, tempurature, et cetera).


For Public Comment Is maximumHistoryStatements relevant for care management? (Personally I think not)


<patientAdministrativeGender>
 <value code=' ' displayName=' ' codeSystem='2.16.840.1.113883.5.1' codeSystemName='AdministrativeGender'/>

The patient gender may be provided in the query. If provided, it serves as a verification of the patient identity. The value must match the patient gender of the patient specified in patientId. If the two values do not match, the Clinical Data Repository will raise a detected issue alert.

<patientBirthTime><value value=' '/></patientBirthTime>

The patient birth time may be provided in the query. If provided, it serves as a verification of the patient identity. The value must match the patient birth time of the patient specified in patientId. If the two values do not match, the Clinical Data Repository will raise a detected issue alert.

<patientId><value root=' ' extension=' '/></patientId>

The patient identifier shall be specified in this element. The root and extension attributes shall be present. When used in cross enterprise settings, the root attribute shall the affinity domain identity OID. To perform a query across a population, the extension attribute may be set to the value '*'.

Sending a query with a known invalid patientId element can be used to ping a Data Repository. For example, setting the root attribute to "0" and omitting the extension attribute should result in a response that raises an ILLEGAL detected issue alert on the patientId field, since the value "0" will never be used as the OID of a patient identity domain. This capability can be used by a Care Manager to verify that it can connect to a Data Repository when configuration parameters are modified.

<patientName><value></value></patientName>

The patient name may be provided in the query. If provided, it serves as a verification of the patient identity. The value must match the patient name of the patient specified in patientId. If the two values do not match, the Data Repository will raise a detected issue alert.

This element shall not be sent when a patient population is queried.

Expected Actions -- Care Manager

The Care Manager shall send a query as specified in the QUPC_IN043100UV interaction. The message shall be sent using web services as specified in the ITI-TF: Appendix V.

The Care Manager shall send an audit message to the audit log repository indicating that a query was initiated, and the parameters of query that were supplied (see the queryByParameter element above).

Expected Actions -- Clinical Data Source

The Clinical Data Source shall send an acknowledgement of the query as specified in the HL7 MCCI_IN000002UV01 interaction in the response to the query message, and shall trigger a QUPC_TE043200UV event to initiate the sending of historical data for all matching patients (see below).

The Clinical Data Source shall send an audit message to the audit log repository indicating that a query was recieved, and the parameters of query that were supplied (see the queryByParameter element above).

The name of the query message shall be QUPC_IN043100UV_Message in the WSDL. The name of the acknowledgement response message shall be MCCI_IN000002UV01 in the WSDL.

The following WSDL snippet defines the types used for this transaction:

Query Message Type Definition
<types>
   <xsd:schema elementFormDefault="qualified" 
      targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
    <!-- Include the message schema -->
    <xsd:include namespace="urn:hl7-org:v3" schemaLocation="QUPC_IN043100UV.xsd"/>
    <xsd:include namespace="urn:hl7-org:v3" schemaLocation="MCCI_IN000002UV01.xsd"/>
  </xsd:schema>
</types>

The message type is declared to be of the appropriate type by the following WSDL snippet:

Query Message WSDL Declaration
<message name='QUPC_IN043100UV_Message'>
  <part element='hl7:QUPC_IN043100UV' name="Body"/>
</message>
<message name='MCCI_IN000002UV01_Message'>
  <part element='hl7:MCCI_IN000002UV01' name="Body"/>
</message>

Other WSDL declarations required for this transaction are defined under the Domain Content section.


WSDL Declarations

The following WSDL naming conventions SHALL apply for this transaction:

WSDL Definitions for PCC-1
WSDL Item Value
wsdl:definitions/@name CareManager
Get Care Record Query QUPC_IN043100UV_Message
Message Acknowledgement MCCI_IN000002UV01_Message
portType CareManager_PortType
Query Operation CareManager_QUPC_IN043100UV
SOAP 1.1 binding CareManager_Binding_Soap11
SOAP 1.1 port CareManager_Port_Soap11
SOAP 1.2 binding CareManager_Binding_Soap12
SOAP 1.2 port CareManager_Port_Soap12

The following WSDL snippets specify the Port Type and Binding definitions, according to the requirements specified in ITI TF-2: Appendix V. A full WSDL example for the Care Manager actor can be found at ftp://ftp.ihe.net/TF_Implementation_Material/PCC/CareManager.wsdl. For a general description of the WSDLs for PCC see the Appendix of the same name in this volume.

Port Type
<portType name="CareManager_PortType">
 <operation name="CareManager_QUPC_IN043100UV">
   <input message="tns:QUPC_IN043100UV_Message"
     wsaw:Action="urn:hl7-org:v3:QUPC_IN043100UV"/>
   <output message="MCCI_IN000002UV01_Message" 
     wsaw:Action="urn:hl7-org:v3:MCCI_IN000002UV01"/>
 </operation>
</portType>
Port Types for PCC-1
Bindings
<binding name="CareManager_Binding_Soap12" 
   type="CareManager_PortType">
 <wsoap12:binding style="document"
   transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="CareManager_QUPC_IN043100UV">
   <wsoap12:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
   <input>
     <wsoap12:body use="literal"/>
   </input>
   <output>
     <wsoap12:body use="literal"/>
   </output>
 </operation>
</binding>
SOAP 1.2 Binding for PCC-1
<binding name="CareManager_Binding_Soap11" 
   type="CareManager_PortType">
 <wsoap11:binding style="document"
   transport="http://schemas.xmlsoap.org/soap/http"/>
 <operation name="CareManager_QUPC_IN043100UV">
   <wsoap11:operation soapAction="urn:hl7-org:v3:QUPC_IN043100UV"/>
   <input>
     <wsoap11:body use="literal"/>
   </input>
   <output>
     <wsoap11:body use="literal"/>
   </output>
 </operation>
</binding>
SOAP 1.1 Binding for PCC-1