Message-ID: <1424697721.8668.1711720015005.JavaMail.confluence@ip-172-30-4-17.ec2.internal> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8667_994305455.1711720015004" ------=_Part_8667_994305455.1711720015004 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html PDO Query Use Case Scenarios

PDO Query Use Case Scenarios

Scena= rio: Get patient data from a patient set id

This request is divided into three parts:

  1. input_list

The input_list accepts either the id of the patient set or a list of pat= ient ids.

  1. filter_list

The filter_list holds a list of panels. The panels have the item details= that are used in constructing a PDO query.

  1. output_option

The output_option specifies which set of patient data to return.

Each of the pa= tient data sections in the output_option has attributes to specify= the level of detail data that is expected in the response.

Request Type

Request

Response

getPDO_fromInputList

GetPDOFromInputList_requestType

master_responseType


Input Option List Type

The input list to the PDO request can be in one of the following formats= . i.e. the patient_list, encounter_list, pid_list, and eid_list.

Element Name

Description

patient_list

The patient_list input can be in one of these= three forms.

  1. The patient set id (<patient_set_coll_id>)
  2. An enumeration list of the patient id (<patient_id>)
  3. The entire patients of datamart (<entire_patient_set>)


    Example for <patient_list>:
    &= lt;patient_list max=3D"10" min= =3D"0">
    <index=3D"0">86850</patient_id>

    <!---->

    <patient_= set_coll_id>4741</patient_set_coll_id>=

    = <!--OR--> <= br class=3D"atl-forced-newline">
    <entire_patient_set >true</entire_patient_set>
    </patient_l= ist>

encounter_list

The encounter_list input format is similar to= the patient_list. This list can be in one of three forms.

  1. The encounter set id (<encounter_set_coll_id>)
  2. An enumeration list of the encounter id (<encounter_id>)
  3. The entire encounters of datamart (<entire_encounter_set>)

pid_list

The pid_list consists of a list of enumerated= patient ids (patient_ide) and their source value. This input allows the us= er to query the data via the patient_ide and its source. The PDO service fi= rst maps the patient_ide to the patient_num before querying the datamart. <= br class=3D"atl-forced-newline">
= Example for <pid_list>:
<pid_list>=
<pid index=3D"1" source=3D<= /span>"MGH_E">PAT_MGH_001</pid>
<
pid index=3D"2" source=3D"B= WH_E">PAT_BWH_001</pid>
</pid_list>

eid_list

The eid_list consists of a list of enumerated= encounter ids (encounter_ide) and their source value. This input allows th= e user to query the data via the encounter_ide and its source. The PDO serv= ice first maps the encounter_ide to the encounter_num before querying the d= atamart.

Example for <pid_list>:
<eid_list>
<eid = index=3D"1" source=3D"MGH_E">ENC_MGH_001</pid<= span style=3D"color: rgb(0,0,255);">>
<eid index=3D"2" source<= span style=3D"color: rgb(0,0,255);">=3D"BWH_E">ENC_B= WH_001</pid>
&= lt;/eid_list>


Filter List Type

Please refer to the earlier section titled Panel Definition Detail.
The LARGETEXT search in the panel de= finition requires the minimum of DATA_DEID user role.

Output Option List Type

This option specifies the list of sections that is required in the PDO r= esponse.

Attribute Name

Description

Implemented

name =3D "asattributes

none"

This option specifies to return the names for= the codes when returning the PDO data. The names for the codes are availab= le in the CODE_LOOKUP table.

Yes

phi =3D "encrypted

unencrypted"

 

No

time =3D "nozone

withzone"

 

No



Example:
<!-- output options -->
<output_option name=3D"asattributes">
<patient_set select=3D"<= span style=3D"color: rgb(0,0,255);">using_filter_list
" onlykeys=3D"true"/>
<concept_set_using_fi= lter_list select=3D"onlykeys=3D"true"/>
<modifier_set_using_filter_list select=3D"using_filter_list" onlykeys=3D"true"/>
<observation_set selectionfilter=3D"m= in_value" withmodifiers<= span style=3D"color: rgb(0,0,255);">=3D"true" blob=3D
"false" onlykeys=3D
"false"/>
<
event_set select=3D"using_filter_list" = onlykeys=3D"true"= />
<pid_set select=3D"using_filter_list" onlykeys=3D"true"/>
<<= /span>eid_set select=3D= "using_filter_list" onlykeys=3D"true"/>

<observer_set_u= sing_filter_list onlykeys=3D"true"/> </output_option>= ;

The following are the available options for each element in the <o= utput_option>.

Attribute Name

Description

Implemented

onlykeys =3D "true

false"

If this option is "true" then only the primar= y keys will be returned.
If it is "false"= then all the fields except the blob and tech data fields will be returned.=

 

blob =3D "true

false"

This option specifies whether the blob field = is required in the output. The blob option requires the minimum of DATA_DEI= D user role.

 

techdata =3D "true

false"

This option specifies whether the blob field = is required in the output. The blob option requires the minimum of DATA_DEI= D user role.

 

select =3D "using_filter_list

using_input_list"

There are a couple of ways to select the PDO = data.

I= f the select option is "using_input_list" then the returned data w= ill be based on the <input_list> and the fact table will not= be used to return the data.

If it is "using_filter_list" then return the= data that satisfies the <filter_list> constraints when appl= ied on the fact table.

 

selectionfilter =3D "min_value

max_value

first_value

last_value

single_observation

last_n_values"

This option will retrieve specific results de= pending on which one is defined in the xml message.

If min_value is speci= fied then the minimum for the NVAL_NUM will be returned for each patient in= the concept group.

If max_value is specified then the maximum for the NV= AL_NUM will be returned for each patient in the concept group.

If first_value<= /em> is specified then the minimum for the START_DATE will be returned for = each patient in the concept group.

If last_value is specified then the ma= ximum for the START_DATE will be returned for each patient in the concept g= roup.

I= f single_observation is specified then the will be return just one= record even if it contains more than one due to different values in the MO= DIFIER_CD column for each patient in the concept group.

If last_n_values = is specified then the last number of records in the concept group, where th= e value contains the number of records

 


Element Name

Description

patient_set

Return the set of patient dimension data eith= er for the input list or from the patient present in the observation set. <= br class=3D"atl-forced-newline">

observation_set

Return the observation set of the patient dat= a object. There could be a multiple number of <observation_set> returned and the number of <observation_set> returned wi= ll be equal to the number of panels defined in the filter list.

Observation set = has the attribute "panel_name" which corresponds to "name= " attribute defined in the <panel>.

For backward compatibility to 1= .5 clients, which expects a unique observation fact not including the modif= ier option of the fact namely the INSTANCE_NUM column, the sending applicat= ion version should have 1.5 in the PDO request.

Attribute

Description

withmodifiers =3D "true

false"

If the value is "false" then the service will= return the observation where the modifier_cd =3D '@'.
The default value is "true", returns the observation irrespec= tive of the modifier_cd value.

ue

Return the set containing event / visit dimen= sion data occurring in the observation set or from the input list.

pid_set

Return the patient mapping table's informatio= n for the given input list or from the observation set.

patient_ide

patient_ide_source

patient_num

patient_ide_status

1000000

HIVE

1000000

A

1000001

HIVE

1000001

A

123

MGH

1000001

A

777

BWH

1000001

A


&= lt;pid_set>
<!--pid with only the hive number -->
<pid>
<patient_id status=3D"A" s= ource=3D"HIVE">= 1000000</patient_id>
</pid>
<!--pidwithhivenumberandmappingpatient_ide's-->
<pid> =
<= patient_id status=3D"A" source=3D<= /span>"HIVE">1000001&l= t;/patient_id>
<= span style=3D"color: rgb(0,0,255);"><
patient_map_id statu= s=3D"A" source
=3D"MGH">123= </patient_map_id>=
<patient_map_id= status=3D"A" source=3D"BWH">777</patient_map_id>
</pid><= /span>
</pid_set>
= |

eid_set

Return the encounter mapping table's informat= ion for the given input list or from the observation set.

observer_set_using_filter_list

Return the set containing observer / provider= dimension data occurring in the observation set.

concept_set_using_filter_list

Return the set of concept dimension data occu= rring in the observation set.

modifier_set_using_filter_list

Return the set of modifier dimension data occ= urring in the observation set.



Example:
<>
<crc:pdoheader>
<request_type>
getPDO_fromInputList</>
<= span style=3D"color: rgb(0,0,255);"></crc:pdoheader>
crc:request xsi:type
=3D"ns2:GetPDOFromInp= utList_requestType"
xmlns:x= si=3D"http://www.w3.org/2001/XMLSchema-ins= tance">
<!-- inputlist -->
&l= t;input_list>
<patient_list = max=3D"300" min=3D"1">
= <patient_set_coll_id>100</patient_se= t_coll_id>
</patient_list><= br> <!--or-->
<event_list/&g= t;
<!--or--= >
<pid_list min=3D"1" ma= x=3D"3">=
<pid index=3D"1" source=3D"HIVE">9876</
pid>
<
pid index=3D"3" source=3D"H= IVE">1</pi= d>
</p= id_list>
<!--or-->
<eid_list min=3D"1" max=3D"5">
<eid index=3D"1" = source=3D"HIVE">12222313</eid>
</eid_list= >
</in= put_list>
<!-- filterlist -->
&= lt;filter_list>
<panel name
=3D"panel1">
<panel_invert>0</panel_invert= >
<pan= el_accuracy_scale></panel_accuracy_scale>
<panel_start_date<= /span>></panel_start_date>
<panel_end_date
></p= anel_end_date>
<
item>
<= span style=3D"color: rgb(0,0,255);"><
item_name></item_name>
= <item_key></item_key>
= <constrain_by_value&= gt;
<value_operator></value_ope= rator>
<>va= lue_constraint0</value_constraint>
<value_unit_of_measure>unit</value_unit_of_me= asure>
<></value_type
>
</constrain_by_value>
<constrain_by_mod= ifier>
<>\i2b2\= Medications%</applied_path>
<modifier_key
>\\i2b2_DEMO\Dose{color:#0000ff}</modifier_key<= span style=3D"color: rgb(0,0,255);">>

<constrain_b= y_value>
<value_operator></value_operator>
<value_constraint> </value_constraint>
<value_unit_of_measure></value_unit_of_measure>
<value_type= ></value_type>

</constrain_by= _value>
</constrain_by_modifier>
<constrain_by_date>
</constrain_by_date
>
</item>
. . .
</panel>
<panel nam= e=3D"panel2">
<panel_invert>0</panel_invert>
<panel_accuracy_scale
></panel_accuracy_scale><= /span>
<panel_start_date></panel_start_= date>
<panel_end_date></= panel_end_date>
= <item>
<item_name> </item_name><= br> <item_key> &l= t;/item_key>
<constrain_by_value>
<value_= type></value_type>
<value_operator
></va= lue_operator>
<
value_unitofmeasure>= ;</value_unitofmeasure>
<value></value>=
</constrain_by_value>
<constrain_by_modifier></constrain_by_modifier= >
<constrain_by_date></constr= ain_by_date>
</
item>
</
panel>
= . . .
</filter_list>
<!-- output opti= ons -->
<output_option>
= <patient_set select= =3D"using_filter_list" onlykeys=3D"true"/>
<concept_set_using_filter_list select
=3D"using_filter_list" onlykeys=3D"true"/>
<modi= fier_set_using_filter_list sele= ct=3D"using_filter_list" onlykeys=3D"true
"/>
<observation_set
blob=3D"false" onlykeys=3D"false"/>
<= event_set select=3D"using_filter_list" = onlykeys=3D"true"<= span style=3D"color: rgb(0,0,255);">/>

<pid_set select=3D"using_filt= er_list" onlykeys=3D"true"/>
<eid_set select=3D
"using_filter_list" onlyke= ys=3D"true"/>
<observer_set_using_filter_list onlykeys= =3D"true"/>
<!-- To specify generalized= dimension type --> <dimension_set_using_filter_list dimensionname= =3D"dimension1" onlykeys=3D"true"/>
</output_option>
</crc:re= quest>
<!-- response begin
-->
&l= t;response>
<patient_data>

<!-- patient se= t section begins --><= br> <patient_set>=
<patient= >
<patient_id>patient_id6</patient_id>
&= lt;param column=3D"vital_status_cd" type
=3D"string"
= column_descriptor=3D"date= interpretation code"
name<= /span>=3D" ">param3<= ;/param>
= <param column=3D"birth_date" type=3D"dateTime"
column_descriptor
=3D"birthda= te"
name=3D""= >param3</param>
<param column=3D"death_date" type=3D"dateTime
"
column_descriptor=3D"date of death">
param3</param<= span style=3D"color: rgb(0,0,255);">>

<param column=3D"sex_cd= " type=3D"string"<= br> column_descriptor=3D"= gender" name=3D""= >param3</param>
<param column=3D"age_in_years_num" type=3D= "int"
column_descriptorage">param3param>
<param column=3D"language_cd" type
=3D"string"
= column_descriptor=3D"lang= uage" name=3D"">= ;param3</param<param column=3D"race_cd" type=3D"string"
column_descriptor =3D"race" name=3D"">param3</param= >
<par= am column=3D"relig= ion_cd" type=3D"s= tring"
column_descriptor =3D"religion" name=3D"">param3</= param>
&l= t;param column= =3D"marital_status_cd" <= span style=3D"color: rgb(255,0,0);">type
=3D"string"
= column_descriptor =3D"m= arital status" name=3D
"">param3</param
>
<<= span style=3D"color: rgb(163,21,21);">param
column=3D"<= span style=3D"color: rgb(0,0,255);">statecityzip_path_char
" typestring"
column_descriptor=3D"zip code h= ierarchy"
name=3D"" >param3</param
>
</= patient>
. . .
</patient_set>

<!-- concept set section begins -->
<<= /span>concept_set>
<concept>
<concept_path>concept_path0</>
<= span style=3D"color: rgb(0,0,255);"><
concept_cd>concept_cd0</concept_cd>
<name_char>name_char0</name_char>
= </concept>
. . .
</concept_s= et>
<!-- observation set section begins -->
<observation_se= t panel_name=3D"p= anel1">
<observation>
<= span style=3D"color: rgb(0,0,255);"><
event_id source=3D"source3">= event_id3</event_id&= gt;
<patient_id>patient_id9</patient_id>
&= lt;concept_cd namename0">concept_cd3</concept_cd>
<observe= r_cd soruce=3D"s= oruce0">observer_cd3<= span style=3D"color: rgb(0,0,255);"></
observer_cd>
<start_date&= gt;2006-05-04T18:13:51.0Z</<= /span>start_date>
<modifier_cd name
=3D"name1">modifier_cd0</modifier= _cd>
<instance_num>1</instance_num><= br> <valuetype_cd>= ;valuetype_cd0</valuetype_cd
>
<tval_char>tval_char0</tval_char>
<nval_num units=3D"units0"= >3.141592653589</>
<
valueflag_cd name= =3D"name2">valu= eflag_cd0</valueflag_cd>
<quantity_num>3.141592653589&= lt;/quantity_num>
<units_cd<= span style=3D"color: rgb(0,0,255);">>
units_cd0</units_= cd>
<end_date>2006-05-04T= 18:13:51.0Z</end_date>
<location_cd name=3D"name3">location_cd0</location_cd>
= </observation>
<observation>
. . .
</observation>
<= span style=3D"color: rgb(0,0,255);"></
observation_set>=
<observation_set panel_name=3D"panel2">
<obser= vation>
. . .
= </observation>
<observation</observation>
. . .
</observation_set= >
<!-- event set section begins -->
<event_set>
<event>

<event_id source=3D"source0">event_id0</eve= nt_id>
<>patient_= id0</patient_id><= /span>
<start_date<= ;/start_date>
<end_date>
2006-05-04T18:13:51.0Z</end_date>
<
param column=3D
"inout_cd" type=3D
"string" name=3D""
column_descriptor=3D<= /span>"in vs. outpatient code"<= span style=3D"color: rgb(0,0,255);">></param>
<param column<= /span>=3D"location_cd" ty= pe=3D"string" name= =3D""
column_descriptor=3D"location code"></param>
<param col= umn=3D"location_path" type=3D"string" name=3D""
column_descriptor=3D"location hi= erarchy"></param>
<param
column=3D"active_status_cd
" type=3D"string" name=3D= ""
column_descriptor=3D"date interpretation code">= ;</param>
</event>
. . .
</event_s= et>
<!-- observer / provider set section begins -->
<observ= er_set>
<observer>
<
observer_path>observer_path0</observer_path>
<<= span style=3D"color: rgb(163,21,21);">observer_cd
>observer_cd0</observer_cd>

<name_char>name_char3</n= ame_char>
</observer>
.= . .
</observer_set>
<!-- pid set sect= ion begins -->
<
pid_set> <pid> <patient_id status= =3D"A" source=3D"HIVE">123= 456</patient_id><= /span>
</pid>=
<pid>=
<patient_id status=3D"A" s= ource=3D"HIVE">= 234567</patient_id>
<patient_map_id
status=3D"A" source=3D"= EMP_E">ABC1</patient_map_id>
<patient_map_id status
=3D"A" source=3D"MGH_E">XYZ1</patient_map_id>
</pid>
. . .
</pid_set>
</
patient_data>
</response>=
<!-- response end -->
</= message_body>

Scenario: Get = observation blob by primary key

This request returns the observation blob using the observation primary = key.
Example: <= br class=3D"atl-forced-newline"> <<= /span>message_body>
<pdoheader>

<request_type>get_observationfact_by_= primary_key</request_type>
</pdoheader
>
<ns5:r= equest xsi:type=3D"ns5:GetObservationFactByPrimaryKey_requestType" xmlns:xsi=3D<= /span>"http://www.= w3.org/2001/XMLSchema-instance">
<fact_primary_key>
<<= /span>event_id>2004005981</event_id>
<patient_id>52003</patien= t_id>
<concept_cd>LCS-I2B2:= c1009c</concept_cd&g= t;
<observer_id>03840261</observer_id>
&l= t;start_date>1995-08-24T00:00:00.179-05:00</start_date>
= <instance_num>1</instance_num&= gt;
</fact_primary_key>
<fact_output_option select=3D"using_filter_list" onlykeys=3D"false"/>
</ns5:r= equest>
<response>
<<= span style=3D"color: rgb(163,21,21);">patient_data
>
<= ;observation_set>
<observation>
<event_id= source=3D"source3= ">event_id3</event_id>
<
patient_id>pa= tient_id9</patient_id>
<concept_cd name=3D"name0">concept_cd3</concept_cd>
<= ;observer_cd soruce=3D"soruce0">observer_cd3</observer_cd= >
<sta= rt_date>2006-05-04T18= :13:51.0Z</start_date>
<instance_num>1</instance_num
>
<observation_blob>

<![CDATA[

patient notes]]>
</observation_blob>
</obse= rvation >
</observation_set>
</patient_data= >
</response>
</message_body
>


------=_Part_8667_994305455.1711720015004--