Guest User

Untitled

a guest
Jul 3rd, 2012
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.14 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  37.  
  38. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48. <html xmlns="http://www.w3.org/1999/xhtml">
  49.  
  50. <head>
  51.  
  52. <script src="/openmrs/openmrs.js?v=1.10.0.27918" type="text/javascript" ></script>
  53.  
  54. <script src="/openmrs/scripts/openmrsmessages.js?v=1.10.0.27918&locale=en" type="text/javascript" ></script>
  55.  
  56. <link href="/openmrs/openmrs.css?v=1.10.0.27918" type="text/css" rel="stylesheet" />
  57.  
  58. <link href="/openmrs/openmrs_green.css" type="text/css" rel="stylesheet" />
  59.  
  60. <link href="/openmrs/style.css?v=1.10.0.27918" type="text/css" rel="stylesheet" />
  61.  
  62. <script src="/openmrs/dwr/engine.js?v=1.10.0.27918" type="text/javascript" ></script>
  63.  
  64. <script src="/openmrs/dwr/interface/DWRAlertService.js?v=1.10.0.27918" type="text/javascript" ></script>
  65.  
  66.  
  67.  
  68. <script src="/openmrs/scripts/jquery/jquery.min.js?v=1.10.0.27918" type="text/javascript" ></script>
  69.  
  70. <script src="/openmrs/scripts/jquery-ui/js/jquery-ui.custom.min.js?v=1.10.0.27918" type="text/javascript" ></script>
  71.  
  72. <script src="/openmrs/scripts/jquery-ui/js/jquery-ui-timepicker-addon.js?v=1.10.0.27918" type="text/javascript" ></script>
  73.  
  74. <script src="/openmrs/scripts/jquery-ui/js/jquery-ui-datepicker-i18n.js?v=1.10.0.27918" type="text/javascript" ></script>
  75.  
  76. <script src="/openmrs/scripts/jquery-ui/js/jquery-ui-timepicker-i18n.js?v=1.10.0.27918" type="text/javascript" ></script>
  77.  
  78. <link href="/openmrs/scripts/jquery-ui/css/green/jquery-ui.custom.css" type="text/css" rel="stylesheet" />
  79.  
  80.  
  81.  
  82. <link rel="shortcut icon" type="image/ico" href="/openmrs/images/openmrs-favicon.ico">
  83.  
  84. <link rel="icon" type="image/png" href="/openmrs/images/openmrs-favicon.png">
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94. <title>OpenMRS</title>
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. <script type="text/javascript">
  105.  
  106.  
  107.  
  108. var $j = jQuery.noConflict();
  109.  
  110.  
  111.  
  112. /* variable used in js to know the context path */
  113.  
  114. var openmrsContextPath = '/openmrs';
  115.  
  116. var dwrLoadingMessage = 'Loading...';
  117.  
  118. var jsDateFormat = 'mm/dd/yyyy';
  119.  
  120. var jsTimeFormat = 'hh:mm TT';
  121.  
  122. var jsLocale = 'en';
  123.  
  124.  
  125.  
  126. /* prevents users getting false dwr errors msgs when leaving pages */
  127.  
  128. var pageIsExiting = false;
  129.  
  130. if (typeof(jQuery) != "undefined")
  131.  
  132. jQuery(window).bind('beforeunload', function () { pageIsExiting = true; } );
  133.  
  134.  
  135.  
  136. var handler = function(msg, ex) {
  137.  
  138. if (!pageIsExiting) {
  139.  
  140. var div = document.getElementById("openmrs_dwr_error");
  141.  
  142. div.style.display = ""; // show the error div
  143.  
  144. var msgDiv = document.getElementById("openmrs_dwr_error_msg");
  145.  
  146. msgDiv.innerHTML = 'A javascript error has occurred:' + " <b>" + msg + "</b>";
  147.  
  148. }
  149.  
  150.  
  151.  
  152. };
  153.  
  154. dwr.engine.setErrorHandler(handler);
  155.  
  156. dwr.engine.setWarningHandler(handler);
  157.  
  158. </script>
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. </head>
  167.  
  168.  
  169.  
  170. <body>
  171.  
  172. <div id="pageBody">
  173.  
  174.  
  175.  
  176. <div id="userBar">
  177.  
  178.  
  179.  
  180.  
  181.  
  182. <span id="userLoggedInAs" class="firstChild">
  183.  
  184. Currently logged in as Super User
  185.  
  186. </span>
  187.  
  188. <span id="userLogout">
  189.  
  190. <a href='/openmrs/logout'>Log out</a>
  191.  
  192. </span>
  193.  
  194. <span>
  195.  
  196. <a href="/openmrs/options.form">My Profile</a>
  197.  
  198. </span>
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.  
  208. <span id="userHelp">
  209.  
  210. <a href='/openmrs/help.htm'>Help</a>
  211.  
  212. </span>
  213.  
  214.  
  215.  
  216. </div>
  217.  
  218.  
  219.  
  220. <div id="banner">
  221.  
  222. <a href="http://openmrs.org">
  223.  
  224. <div id="logosmall"><img src="/openmrs/images/openmrs_logo_text_small.gif" alt="OpenMRS Logo" border="0"/></div>
  225.  
  226. </a>
  227.  
  228. <table id="bannerbar">
  229.  
  230. <tr>
  231.  
  232. <td id="logocell"> <img src="/openmrs/images/openmrs_logo_white.gif" alt="" class="logo-reduced61" />
  233.  
  234. </td>
  235.  
  236. <td id="barcell">
  237.  
  238. <div class="barsmall">
  239.  
  240. <img align="left" src="/openmrs/images/openmrs_green_bar.gif" alt="" class="bar-round-reduced50"/>
  241.  
  242.  
  243.  
  244. <ul class="navList"> <li id="homeNavLink" class="firstChild">
  245.  
  246. <a href="/openmrs/">Home</a>
  247.  
  248. </li>
  249.  
  250.  
  251.  
  252. <li id="findPatientNavLink">
  253.  
  254. <a href="/openmrs/findPatient.htm">
  255.  
  256.  
  257.  
  258. Find/Create Patient
  259.  
  260.  
  261.  
  262.  
  263.  
  264. </a>
  265.  
  266. </li>
  267.  
  268.  
  269.  
  270.  
  271.  
  272. <li id="dictionaryNavLink">
  273.  
  274. <a href="/openmrs/dictionary">Dictionary</a>
  275.  
  276. </li>
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288. <li id="administrationNavLink">
  289.  
  290. <a href="/openmrs/admin">Administration</a>
  291.  
  292. </li>
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300. </ul>
  301.  
  302.  
  303.  
  304. </div>
  305.  
  306. </td>
  307.  
  308. </tr>
  309.  
  310. </table>
  311.  
  312. </div>
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320. <div id="content">
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332. <div id="openmrs_dwr_error" style="display:none" class="error">
  333.  
  334. <div id="openmrs_dwr_error_msg"></div>
  335.  
  336. <div id="openmrs_dwr_error_close" class="smallMessage">
  337.  
  338. <i>The full stacktrace for this error can usually be found in your server's error logs.</i>
  339.  
  340. <a href="#" onclick="this.parentNode.parentNode.style.display='none'">Hide error</a>
  341.  
  342. </div>
  343.  
  344. </div>
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352.  
  353.  
  354.  
  355.  
  356.  
  357.  
  358. <ul id="menu">
  359.  
  360. <li class="first"><a
  361.  
  362. href="/openmrs/admin">Admin</a></li>
  363.  
  364.  
  365.  
  366. <li
  367.  
  368. class="active">
  369.  
  370. <a
  371.  
  372. href="/openmrs/module/ExportCCD/ccdConfiguration.form">Configure CCD Sections</a>
  373.  
  374. </li>
  375.  
  376.  
  377.  
  378. <!-- Add further links here -->
  379.  
  380. </ul>
  381.  
  382. <h2>
  383.  
  384. Configure CCD Sections
  385.  
  386. </h2>
  387.  
  388.  
  389.  
  390. <script src="/openmrs<openmrs:contextPath/>/dwr/interface/DWRMyModuleService.js?v=1.10.0.27918" type="text/javascript" ></script>
  391.  
  392. <script type="text/javascript">
  393.  
  394. $j(document).ready(function(){
  395.  
  396. $j('#vitalSigns').data("counter",0);
  397.  
  398. $j('#socialHistory').data("counter",0);
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406. $j('#post').click(function(){
  407.  
  408.  
  409.  
  410. $j('#vitalSignsCounter').val($j('#vitalSigns').data("counter"));
  411.  
  412. $j('#socialHistoryCounter').val($j('#socialHistory').data("counter"));
  413.  
  414. $j('form').submit();
  415.  
  416.  
  417.  
  418. });
  419.  
  420.  
  421.  
  422. $j(':button.addButton').click(function(){
  423.  
  424.  
  425.  
  426. var parent=$j(this).parent();
  427.  
  428. var count=$j(parent).data("counter");
  429.  
  430.  
  431.  
  432. var parentId=$j(parent).attr('id');
  433.  
  434. var generatedId=parentId+count+"";
  435.  
  436. alert($j('#'+parentId+'_conceptId_selection').val());
  437.  
  438. DWRMyModuleService.getConceptMappings($j('#'+parentId+'_conceptId').val(),getConceptReferenceTerms);
  439.  
  440.  
  441.  
  442. $j(parent).data("counter",count+1);
  443.  
  444. var spanId=generatedId+"_span";
  445.  
  446. var v='</br><span id="'+spanId+'">'+$j('#'+parentId+'_conceptId_selection').val()+'<input type="hidden" id="'+spanId+'_hid" name="'+spanId+'_hid" value="'+$j('#'+parentId+'_conceptId').val()+'"/><input id="'+spanId+'_remove" type="button" value="remove" onClick="$j(this).parent().remove();refresh(\''+parentId+'\')"/></span>';
  447.  
  448.  
  449.  
  450. $j(parent).append(v);
  451.  
  452.  
  453.  
  454. });
  455.  
  456.  
  457.  
  458. });
  459.  
  460.  
  461.  
  462. function getConceptReferenceTerms(map)
  463.  
  464. {
  465.  
  466. alert("The no of reference source to this concept is"+map.length);
  467.  
  468. }
  469.  
  470.  
  471.  
  472. function refresh (superParentId) {
  473.  
  474. var flag=true;
  475.  
  476. $j('#'+superParentId+' span').each(function(index) {
  477.  
  478.  
  479.  
  480. $j('#'+superParentId).data("counter",index+1);
  481.  
  482. flag=false;
  483.  
  484. var spanId=this.id;
  485.  
  486. var newSpanId=superParentId+index+"_span";
  487.  
  488. this.id=newSpanId;
  489.  
  490. $j('#'+spanId+'_hid').attr('name',newSpanId+'_hid').attr('id',newSpanId+'_hid');
  491.  
  492. $j('#'+spanId+'_remove').removeAttr('onclick',null).unbind('click').attr('id',newSpanId+'_remove').click(function() {
  493.  
  494. $j('#'+newSpanId).remove();
  495.  
  496.  
  497.  
  498.  
  499.  
  500. refresh(superParentId);
  501.  
  502. });
  503.  
  504. });
  505.  
  506. if(flag)
  507.  
  508. $j('#'+superParentId).data("counter",0);
  509.  
  510.  
  511.  
  512. }
  513.  
  514.  
  515.  
  516.  
  517.  
  518. </script>
  519.  
  520.  
  521.  
  522.  
  523.  
  524. <form id='ccdSections' method="POST">
  525.  
  526.  
  527.  
  528. <div class="boxHeader">Configure Vital Sign Section</div>
  529.  
  530. <div id="vitalSigns" class="box">
  531.  
  532. Find Concept(s)
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578. <script src="/openmrs/dwr/interface/DWRConceptService.js?v=1.10.0.27918" type="text/javascript" ></script>
  579.  
  580. <script src="/openmrs/scripts/jquery/autocomplete/OpenmrsAutoComplete.js?v=1.10.0.27918" type="text/javascript" ></script>
  581.  
  582. <script src="/openmrs/scripts/jquery/autocomplete/jquery.ui.autocomplete.autoSelect.js?v=1.10.0.27918" type="text/javascript" ></script>
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600. <script type="text/javascript">
  601.  
  602.  
  603.  
  604. $j(document).ready( function() {
  605.  
  606.  
  607.  
  608. var includeC = "".split(",");
  609.  
  610. var excludeC = "".split(",");
  611.  
  612. var includeD = "".split(",");
  613.  
  614. var excludeD = "".split(",");
  615.  
  616.  
  617.  
  618. // the typical callback
  619.  
  620. var callback = new CreateCallback({includeClasses:includeC, excludeClasses:excludeC, includeDatatypes:includeD, excludeDatatypes:excludeD}).conceptCallback();
  621.  
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628. // set up the autocomplete
  629.  
  630. new AutoComplete("vitalSigns_conceptId_selection", callback, {
  631.  
  632. select: function(event, ui) {
  633.  
  634. funcvitalSigns_conceptIdAutoCompleteOnSelect(ui.item.object, ui.item);
  635.  
  636. },
  637.  
  638. placeholder:'Enter concept name or id',
  639.  
  640. autoSelect: true
  641.  
  642. });
  643.  
  644.  
  645.  
  646. //Clear hidden value on losing focus with no valid entry
  647.  
  648. $j("#vitalSigns_conceptId_selection").autocomplete().blur(function(event, ui) {
  649.  
  650. if (!event.target.value) {
  651.  
  652. jquerySelectEscaped('vitalSigns_conceptId').val('');
  653.  
  654. }
  655.  
  656. });
  657.  
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668. })
  669.  
  670.  
  671.  
  672. function funcvitalSigns_conceptIdAutoCompleteOnSelect(concept, item) {
  673.  
  674. jquerySelectEscaped('vitalSigns_conceptId').val(concept.conceptId);
  675.  
  676.  
  677.  
  678. // if called with initialValue, show the name ourselves
  679.  
  680. if (!item) {
  681.  
  682. jquerySelectEscaped('vitalSigns_conceptId_selection').val(concept.name);
  683.  
  684. jquerySelectEscaped('vitalSigns_conceptId_selection').autocomplete("option", "initialValue", concept.name);
  685.  
  686. }
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696. }
  697.  
  698. </script>
  699.  
  700.  
  701.  
  702. <input type="text" id="vitalSigns_conceptId_selection" />
  703.  
  704. <input type="hidden" name="vitalSigns_conceptId" id="vitalSigns_conceptId" />
  705.  
  706. <input type="text" name="vitalSigns_conceptId_other" id="vitalSigns_conceptId_other" style="display:none" value=""/>
  707.  
  708. <input type="button" value="ADD" id="addButton" class="addButton"/>
  709.  
  710. <input type="hidden" id="vitalSignsCounter" name="vitalSignsCounter"/>
  711.  
  712. </div>
  713.  
  714. <br>
  715.  
  716. <div class="boxHeader">Configure Social History Section</div>
  717.  
  718. <div id="socialHistory" class="box">
  719.  
  720. Find Concept(s)
  721.  
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.  
  787.  
  788. <script type="text/javascript">
  789.  
  790.  
  791.  
  792. $j(document).ready( function() {
  793.  
  794.  
  795.  
  796. var includeC = "".split(",");
  797.  
  798. var excludeC = "".split(",");
  799.  
  800. var includeD = "".split(",");
  801.  
  802. var excludeD = "".split(",");
  803.  
  804.  
  805.  
  806. // the typical callback
  807.  
  808. var callback = new CreateCallback({includeClasses:includeC, excludeClasses:excludeC, includeDatatypes:includeD, excludeDatatypes:excludeD}).conceptCallback();
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816. // set up the autocomplete
  817.  
  818. new AutoComplete("socialHistory_conceptId_selection", callback, {
  819.  
  820. select: function(event, ui) {
  821.  
  822. funcsocialHistory_conceptIdAutoCompleteOnSelect(ui.item.object, ui.item);
  823.  
  824. },
  825.  
  826. placeholder:'Enter concept name or id',
  827.  
  828. autoSelect: true
  829.  
  830. });
  831.  
  832.  
  833.  
  834. //Clear hidden value on losing focus with no valid entry
  835.  
  836. $j("#socialHistory_conceptId_selection").autocomplete().blur(function(event, ui) {
  837.  
  838. if (!event.target.value) {
  839.  
  840. jquerySelectEscaped('socialHistory_conceptId').val('');
  841.  
  842. }
  843.  
  844. });
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856. })
  857.  
  858.  
  859.  
  860. function funcsocialHistory_conceptIdAutoCompleteOnSelect(concept, item) {
  861.  
  862. jquerySelectEscaped('socialHistory_conceptId').val(concept.conceptId);
  863.  
  864.  
  865.  
  866. // if called with initialValue, show the name ourselves
  867.  
  868. if (!item) {
  869.  
  870. jquerySelectEscaped('socialHistory_conceptId_selection').val(concept.name);
  871.  
  872. jquerySelectEscaped('socialHistory_conceptId_selection').autocomplete("option", "initialValue", concept.name);
  873.  
  874. }
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884. }
  885.  
  886. </script>
  887.  
  888.  
  889.  
  890. <input type="text" id="socialHistory_conceptId_selection" />
  891.  
  892. <input type="hidden" name="socialHistory_conceptId" id="socialHistory_conceptId" />
  893.  
  894. <input type="text" name="socialHistory_conceptId_other" id="socialHistory_conceptId_other" style="display:none" value=""/>
  895.  
  896. <input type="button" value="ADD" id="addButton" class="addButton"/>
  897.  
  898. <input type="hidden" id="socialHistoryCounter" name="socialHistoryCounter"/>
  899.  
  900. </div>
  901.  
  902. <input type="submit" value='Save' /></td>
  903.  
  904. </form>
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922. <br/>
  923.  
  924. </div>
  925.  
  926. </div>
  927.  
  928.  
  929.  
  930. <div id="footer">
  931.  
  932. <div id="footerInner">
  933.  
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940. <span id="localeOptions">
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. <a href="?&amp;lang=en_GB">English (United Kingdom)</a>
  955.  
  956.  
  957.  
  958.  
  959.  
  960. |
  961.  
  962.  
  963.  
  964. <a href="?&amp;lang=en_US">English (United States)</a>
  965.  
  966.  
  967.  
  968. </span>
  969.  
  970.  
  971.  
  972. <span id="buildDate">Last Build: Jun 16 2012 02:38 PM</span>
  973.  
  974.  
  975.  
  976. <span id="codeVersion">Version: 1.10.0 SNAPSHOT Build 27918</span>
  977.  
  978.  
  979.  
  980. <span id="poweredBy"><a href="http://openmrs.org">Powered by OpenMRS <img border="0" align="top" src="/openmrs/images/openmrs_logo_tiny.png"/></a></span>
  981.  
  982. </div>
  983.  
  984. </div>
  985.  
  986.  
  987.  
  988. </body>
  989.  
  990. </html>
Advertisement
Add Comment
Please, Sign In to add comment