i2b2 Web Client
Space shortcuts
Space Tools

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

i2b2.ONT.cfg.msgs.GetSchemes =
'<?xml version="1.0" encouding="UTF-8" standalone="yes"?>\n'
'<ns3:request xmlns:ns3="http://www.i2b2.org/xsd/hive/mghs/1.1."
              xmlns:ns4="http://www.i2b2.org/xsd/cell/ont/1.1/"
              xmlns:ns2="http://www.i2b2.org/xsd/hive/plugin/">\n'
'          <message_header>\n'
'                    {proxy_info}\n'
'                    <i2b2_version_compatible>1.1</i2b2_version_compatible>\n'
'                    <hl7_version_compatible>2.4</hl7_version_compatible>\n'
'                    <receiving_facility>\n'
'                              <facility_name>i2b2 Hive</facility_name>\n'
'                    </receiving_facility>\n'
'                    <datetime_of_message>{header_msg_datetime}</datetime_of_message>\n'
'                    <security>\n'
'                              <domain>{sec_domain}</domain>\n'
'                              <username>{sec_user}</username>\n'
'                                        {sec_pass_node}\n'
'                    </security>\n'
'                    <message_control_id>\n'
'                              <message_num>{header_msg_id}</message_num>\n'
'                              <instance_num>0</instance_num>\n'
'                    </message_control_id>\n'
'                    <processing_id>\n'
'                              <processing_id>P</processing_id>\n'
'                              <processing_mode>I</processing_mode>\n'
'                    </processing_id>\n'
'                    <accept_acknowledgement_type>AL</accept_acknowledgement_type>\n'
'                    <application_acknowledgement_type>AL</application_acknowledgement_type>\n'
'                    <country_code>US</country_code>\n'
'                    <project_id>{sec_project}</project_id>\n'
'          </message_header>\n'
'          <request_header>\n'
'                    <result_waittime_ms>{result_wait_time}000</result_waittime_ms>\n'
'          </request_header>\n'
'          <message_body>\n'
'                    <ns4:get_schemes type="default"/>\n'
'          </message_body>\n'
'</ns3:request>';



Placeholder tags starting, and ending, with three curly brackets ( "{" and "}" ) are contained throughout this message string. Between the tag's curly brackets is its non-space containing name used to identify the tag. These tags are replaced with values passed in the call parameters when the communication method is invoked.

...

i2b2.ONT.cfg.parsers.GetSchemes = function(){
'   '   '   '  '  if (!this.error){
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6f63a4d1e570c774-1800fb54-40084c50-b625ac55-3ccabc2448b8bd1f4eab28a4"><ac:plain-text-body><![CDATA[
'  '   '   '   '   '   '  '  '  '  this.model = [];
]]></ac:plain-text-body></ac:structured-macro>
'  '   '   '   '   '   '  '  '  '  // extract records from XML msg
'   '   '   '   '   '   '  '  '  '  var c = this.refXML.getElementsByTagName('concept');
'   '   '   '   '   '   '  '  '  '  for (var i=0; i < 1 * c.length; i++) {
'   '   '     '   '   '   '   '  '  '  '  '  '  '  '  var o = new Object;
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3a09664dd7c3e166-44d076e1-420842f2-a3f69a5b-e733dcf54a20878f234d8370"><ac:plain-text-body><![CDATA[
'  '   '     '   '   '  '  '  '  '  '  '  '  '  '  o   o.xmlOrig = c[i];
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7113203ac8ae4b0b-faffb8bd-48364a53-a701902b-fe9d921151058955455821c4"><ac:plain-text-body><![CDATA[
'  '   '     '   '   '  '  '  '  '  '  '  '  '  '  o   o.level = i2b2.h.getXNodeVal(c[i],'level');
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="90b4851873fac134-440a91bb-4b384af4-8037b305-bd84a6146f9b31a9cd56aa54"><ac:plain-text-body><![CDATA[
'  '   '     '   '   '  '  '  '  '  '  '  '  '  '  o   o.key = i2b2.h.getXNodeVal(c[i],'key');
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="cbc7a6f5a212bbc3-bbf813b7-41224fd7-8f3c953a-059df6bab5d3f49a452a01a4"><ac:plain-text-body><![CDATA[
'  '   '     '   '   '  '  '  '  '  '  '  '  '  '  o   o.name = i2b2.h.getXNodeVal(c[i],'name');
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bf1549e175a87cc3-f92ea264-44494387-8cc3a193-15818fff82d7ef6a5ba6e6b8"><ac:plain-text-body><![CDATA[
'  '   '     '   '   '  '  '  '  '  '  '  '  '  '  o   o.total_num = i2b2.h.getXNodeVal(c[i],    &'totalnum');
]]></ac:plain-text-body></ac:structured-macro>
'   '   '   '   '   '   '   '   '   '  '  '  '  '  '  // save extracted info
'   '   '   '   '   '   '   '   '   '  '  '  '  '  '  this.model.push(o);
'   '   '   '   '   '   '  '  '  '  }
'   '   '   '  '  } else {
'   '   '   '   '   '   '  '  '  '  this.model = false;
'   '   '   '   '   '   '  '  '  '  console.error(

Wiki Markup
"\[GetSchemes\] Could not parse() data\!"
);
'   '   '   '  '  }
'   '   '   '  '  return this;
}; |



Note
titleBe Careful

Very specific behavior is expected from your parser function! Your parser is expected to create an array called this.model containing a list of values or JavaScript objects representing data from the XML message. If an error occurs, your parser is expected to set this.model = false. Your parser routine must always return the reference to its this variable

...

i2b2.ONT.ajax._addFunctionCall("GetSchemes",
'   '   '   '  '  "{URL}getSchemes",
'   '   '   '  '  i2b2.ONT.cfg.msgs.GetSchemes,
'   '   '   '  '  null,
'   '   '   '  '  i2b2.ONT.cfg.parsers.GetSchemes);

...

<div id="ExampTabs-mainDiv">
<cell_datas>
'   '   '   '  '  <cell_data id="ONT">
'   '   '   '   '   '   '  '  '  '  <name>Ontology Cell</name>
'   '   '   '   '   '   '  '  '  '  <url>http://webservices.i2b2.org/i2b2/rest/OntologyService/</url>
'   '   '   '   '   '   '  '  '  '  <project_path>/</project_path>
'   '   '   '   '   '   '  '  '  '  <method>REST</method>
'   '   '   '   '   '   '  '  '  '  <can_override>true</can_override>
'   '   '   '  '  </cell_data>
</cell_datas>

...

i2b2.CRC.ajax._addFunctionCall("runQueryInstance_fromQueryDefinition",
'   '   '   '  '  "{URL}request",
'   '   '   '  '  i2b2.CRC.cfg.msgs.runQueryInstance_fromQueryDefinition,
'   '   '   '  ' 

Wiki Markup
*\[*
"psm_result_output"
Wiki Markup
*,  \[*
"psm_query_definition"
Wiki Markup
*,  \[*
"shrine_topic"]);

...