0

私の仕事では、独自のシステムを使用して医療記録を保存しています。サイトは JavaScript でコーディングされており、サイトのコーディングを変更することはできません。iPad を使用してサイトにアクセスしたいのですが、HTML を提供するブラウザーを介してサイトにアクセスします。

onChange 値を持つドロップダウン リストがあり、項目がドロップダウン リストから選択されると、onChange="doAction(this)" が呼び出されます。これはデスクトップ ブラウザでは問題なく動作しますが、iPad は onChange をサポートしていません。別の方法として onBlue を使用することはわかっていますが、HTML を変更するアクセス権がありません。

私ができることを望んでいたのは、一度クリックすると、原則として onChange イベントが行ったことを行うブックマークレットを追加することでした。

現在のアクションリスト HTML は次のとおりです。

<select class="actionList" onChange="doAction(this)" style="width:100%"><option class="actionHeading" selected value="nothing">Select action ..</option><option class="action" value="moreInfo">&nbsp;&nbsp;More Info (shortcut key ' i ')</option><option class="actionHeading" disabled>Add Electronic Form ..</option><option class="action" value="xform-progressnotes-amendment-discharge">&nbsp;&nbsp;Amendment Discharge Summary</option><option class="action" value="xform-progressnotes-clinical-review">&nbsp;&nbsp;Clinical Review</option><option class="action" value="xform-dischargesummary">&nbsp;&nbsp;Discharge Summary</option><option class="action" value="xform-progressnotes-family-work">&nbsp;&nbsp;Family Work</option><option class="action" value="xform-progressnotes-medical-review">&nbsp;&nbsp;Medical Review</option><option class="action" value="xform-medicationsummary">&nbsp;&nbsp;Medication Summary Form</option><option class="action" value="xform-operationrecord">&nbsp;&nbsp;Operation Sheet</option><option class="action" value="xform-progressnotes-inpatient">&nbsp;&nbsp;Progress Notes</option><option class="action" value="xform-progressnotes-weekly-summary">&nbsp;&nbsp;Weekly Summary</option></select></td>

ブックマークレットに入れたい唯一のオプションは、医療レビューオプションを「選択」することです。

<option class="action" value="xform-progressnotes-medical-review">&nbsp;&nbsp;Medical Review</option>

onChange="doAction(this)" の JavaScript は次のとおりです。

function doAction(selectObj)
                {
                    var xformPrefix = 'xform-';
                    var chartPrefix = 'chart-';

                    var action = selectObj.value;
                    selectObj.selectedIndex = 0;
                    if (action == 'moreInfo')
                    {
                        moreInfo();
                    }
                    else if (action == 'referForAttn')
                    {
                        referForAttn();
                    }
                    else if(action.startsWith(chartPrefix)) {

                        var chartName = action.substring(chartPrefix.length);
                        var url;
                        var processedURL;

                        var checkExistUrl = '/udr/json/?action=chartsdescription';
                        checkExistUrl += '&patientId=630402';
                        checkExistUrl += '&chartName=' + chartName;
                        $.ajax({
                            async:false,
                            dataType:"json",
                            url:checkExistUrl,
                            success:function(data){

                                if(data.description != "")
                                {
                                    var answer = confirm(data.description);
                                }

                                if(answer || data.description == "")
                                {

                                }
                            }
                        });
                    }
                    else if (action.startsWith(xformPrefix))
                    {
                        var xformName = action.substring(xformPrefix.length);
                        var url;
                        var windowWidth;
                        var windowHeight;
                        var processedURL;


                            if (xformName == 'progressnotes-amendment-discharge')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-amendment-discharge&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-amendment-discharge%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }

                            if (xformName == 'progressnotes-clinical-review')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-clinical-review&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-clinical-review%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }

                            if (xformName == 'dischargesummary')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=dischargesummary&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Ddischargesummary%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 550;
                    }

                            if (xformName == 'progressnotes-family-work')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-family-work&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-family-work%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }

                            if (xformName == 'progressnotes-medical-review')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-medical-review&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-medical-review%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }

                            if (xformName == 'medicationsummary')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=medicationsummary&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dmedicationsummary%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 760;
                    }

                            if (xformName == 'operationrecord')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=operationrecord&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Doperationrecord%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 760;
                    }

                            if (xformName == 'progressnotes-inpatient')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-inpatient&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-inpatient%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }

                            if (xformName == 'progressnotes-weekly-summary')
                            {
                                url = '/oip-forms-viewer/forms/templates?udrSessionId=BF0C3C8399163439782C67D2757477DC&formName=progressnotes-weekly-summary&patientId=630402&episodeId=458698&transactionId=&xformAction=new&sectionId=Admission';

                                processedURL = '%2Foip-forms-viewer%2Fforms%2Ftemplates%3FudrSessionId%3DBF0C3C8399163439782C67D2757477DC%26formName%3Dprogressnotes-weekly-summary%26patientId%3D630402%26episodeId%3D458698%26transactionId%3D%26xformAction%3Dnew%26sectionId%3DAdmission'

                        windowWidth = 800;
                        windowHeight = 500;
                    }




                var newForm;
                var confirmMsg = "There is another e-form opened. \n";
                confirmMsg += "Press \"Cancel\" to finish editing the open e-form\n";
                confirmMsg += "Press \"OK\" to discard it and open a new one.";
                try {
                    var location = findFrame(top, 'main').win.document.location;
                    newForm = confirm(confirmMsg);
                }
                catch(e) {
                    newForm = true;
                }
                if(newForm) {
                    try {
                        findFrame(top, 'main').win.close();
                    }
                    catch(e) {}

                    findFrame(top, 'main').win = openCentredWindow(url, 'xformWindow', windowWidth, windowHeight);

                    try {
                        // setting the window title change on window load
                        $(findFrame(top, 'main').win).load(changeEformWindowTitle);
                    }
                    catch(e) {
                        // nothing to report
                    }
                    try {
                        // trying to change the window title early if the on load hasn't worked
                        setTimeout('changeEformWindowTitle()', 2000);
                    }
                    catch(e) {
                        // nothing to report
                    }
                    try {
                        // doing it a second time in case the first attempt was too early.
                        setTimeout('changeEformWindowTitle()', 8000);
                    }
                    catch(e) {
                        // nothing to report
                    }
                    try {
                        // doing it a third time 40 seconds later in case it there was a pre-fill.
                        setTimeout('changeEformWindowTitle()', 40000);
                    }
                    catch(e) {
                        // nothing to report
                    }
                }
                else {
                    findFrame(top, 'main').win.focus();
                }
            }
        }

あなたが提供できるどんな助けでも大歓迎です!ありがとう。

4

1 に答える 1

0

最善の策は、iPad と実際の製品の間にプロキシ サーバーを配置することです。このプロキシは、独自のシステムによって生成された html を変更できます。

プロキシの初心者向けソリューションとして nginx を調べることができます。

乾杯、T.

PS : ブックマークレットが iPad で動作するとは思えません。あったとしても、それはひどい UI になるでしょう。

于 2012-10-03T14:39:04.723 に答える