BESQuery



It is possible for the Back End system to request a transmission of patient(s) and their actions, based on Action createdate and or DataTypes and or BackendPatientID’s (BESPIDS)

The query is done via a XML document that specifies the query to execute against the Noah Database.

The Noah Web Service has the method DoQuery() that puts the query in the Noah Web Service job queue.

The schema definition of the BESQuery:



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

<xs:schema id="BESQuery"

     targetNamespace="http://www.himsa.com/BESQuery.xsd"

     elementFormDefault="qualified"

     xmlns="http://www.himsa.com/BESQuery.xsd"

     xmlns:mstns="http://www.himsa.com/BESQuery.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema"

>

          <xs:element name="Query">

                    <xs:complexType>

                              <xs:sequence>

                                        <xs:element ref="CreateDate" minOccurs="0" maxOccurs="1" />

                                        <xs:element ref="DataTypes" minOccurs="0" maxOccurs="1" />



                                        <xs:element ref="BESPIDS" minOccurs="0" maxOccurs="1" />

                              </xs:sequence>

                              <xs:attribute name="WSIConformanceLevel" type="xs:int" use="optional"/>

                    </xs:complexType>

          </xs:element>

          <xs:element name="CreateDate">

                    <xs:complexType>

                              <xs:sequence>

                                        <xs:element name="StartDate" minOccurs="0" maxOccurs="1"

type="xs:dateTime"/> 

                                        <xs:element name="EndDate" minOccurs="0" maxOccurs="1"

type="xs:dateTime"/>

                              </xs:sequence>

                    </xs:complexType> Outdent

          </xs:element>

          <xs:element name="DataTypes">

                    <xs:complexType>

                              <xs:sequence>

                                         <xs:element name="DataType" minOccurs="0" maxOccurs="unbounded">

                                                   <xs:simpleType>

                                                             <xs:restriction base="xs:NMTOKENS">

<xs:enumeration value="Audiogram"/>

<xs:enumeration value="REM"/>

<xs:enumeration value="HIT"/>

<xs:enumeration value="Impedance"/>

<xs:enumeration



value="HearingInstrumentSelection"/>

<xs:enumeration

value="HearingInstrumentFitting"/>

<xs:enumeration

value="RemoteControlSelection"/>

</xs:restriction>

</xs:simpleType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

<xs:element name="BESPIDS">

<xs:complexType>

<xs:sequence>

<xs:element name="BESPID" minOccurs="0" maxOccurs="unbounded"

type="xs:string"/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Please note the <xs:attribute name="WSIConformanceLevel" type="xs:int" use="optional"/> which was added and was defined for Noah 4.4. The value controls the conformance level for the returned data. (Default is level 1.



Example:

<?xml version="1.0"?>

<Query xmlns=http://www.himsa.com/BESQuery.xsd WSIConformanceLevel=”2”>

<CreateDate>

<StartDate>2010-03-20T10:29:23</StartDate>

<EndDate>2012-03-20T10:29:23</EndDate>

</CreateDate>

<DataTypes>

<DataType>Audiogram</DataType>

<DataType>HearingInstrumentSelection</DataType>

</DataTypes>

<BESPIDS>

<BESPID>0000002</BESPID>

<BESPID>0000006</BESPID>

</BESPIDS>

This will return Patient actions created between StartDate and EndDate, only Audiograms and HearingInstrumentSelections for BESPIDS 0000002 and 0000006

Omitting BESPIDS will return for all BESPIDS the same applies for CreateDate and Datatypes. Omitting StartDate or EndDate will be open StartDate or open EndDate.

The following example returns all audiograms.



<?xml version="1.0"?>

<Query xmlns="http://www.himsa.com/BESQuery.xsd">

<DataTypes>

<DataType>Audiogram</DataType>

</DataTypes>

</Query>

</Query>