2018年10月9日火曜日

患者基本情報の取得と画面に表示

前回、患者ID、氏名を患者基本情報画面に表示することが出来たので、今回は、患者ID、氏名以外の患者基本情報も画面に表示させれるよう、プログラムを修正していく。

まずはORCAの****のところをそれらしい患者データを入れていく。
図1のように患者データを入れた。
図1:ORCAの患者基本情報の画面
あとは、残りの患者基本情報を画面に表示させていく。
HTMLを図2のように修正した。


HTML
  1. <ons-page ng-controller="PatientController as patient">
  2.  
  3. <ons-toolbar>
  4. <div class="center">基本情報</div>
  5. </ons-toolbar>
  6.  
  7. <ons-list>
  8. <ons-list-header>
  9. <h1>個人情報</h1>
  10. </ons-list-header>
  11. </ons-list>
  12.  
  13. <div class="haikei">
  14. <ons-list-item>
  15. <ons-col width="30%"> <h6>氏名</h6> </ons-col>
  16. <ons-col><h4>{{ patient.WholeName }}</h4></ons-col>
  17. </ons-list-item>
  18. </div>
  19.  
  20. <div class="haikei2">
  21. <ons-list-item>
  22. <ons-col width="30%"> <h6>シメイ</h6> </ons-col>
  23. <ons-col><h4>{{ patient.WholeName_inKana }}</h4></ons-col>
  24. </ons-list-item>
  25. </div>
  26.  
  27. <div class="haikei">
  28. <ons-list-item>
  29. <ons-col width="30%"> <h6>患者ID</h6> </ons-col>
  30. <ons-col><h4>{{ patient.Patient_ID }}</h4></ons-col>
  31. </ons-list-item>
  32. </div>
  33.  
  34. <div class="haikei2">
  35. <ons-list-item>
  36. <ons-col width="30%"> <h6>性別</h6> </ons-col>
  37. <ons-col><h4>{{ patient.Sex }}</h4></ons-col>
  38. </ons-list-item>
  39. </div>
  40.  
  41. <div class="haikei">
  42. <ons-list-item>
  43. <ons-col width="30%"> <h6>生年月日</h6> </ons-col>
  44. <ons-col><h4>{{ patient.BirthDate }}</h4></ons-col>
  45. </ons-list-item>
  46. </div>
  47.  
  48. <div class="haikei2">
  49. <ons-list-item>
  50. <ons-col width="30%"> <h6>住所</h6> </ons-col>
  51. <ons-col><h4>{{ patient.WholeAddress1 }}</h4></ons-col>
  52. </ons-list-item>
  53. </div>
  54.  
  55.  
  56. <ons-list>
  57. <ons-list-header><h1>アレルギー等</h1></ons-list-header>
  58. </ons-list>
  59.  
  60. <div class="haikei3">
  61. <ons-list-item>
  62. <ons-col width="30%"> <h6>アレルギー</h6> </ons-col>
  63. <ons-col><h4>{{ patient.Allergy1 }}</h4></ons-col>
  64. </ons-list-item>
  65. </div>
  66.  
  67. <div class="haikei4">
  68. <ons-list-item>
  69. <ons-col width="30%"> <h6>感染症</h6> </ons-col>
  70. <ons-col><h4>{{ patient.Infection1 }}</h4></ons-col>
  71. </ons-list-item>
  72. </div>
  73.  
  74. <div class="haikei3">
  75. <ons-list-item>
  76. <ons-col width="30%"> <h6>禁忌</h6> </ons-col>
  77. <ons-col><h4>{{ patient.Contraindication1 }}</h4></ons-col>
  78. </ons-list-item>
  79. </div>
  80.  
  81.  
  82. <ons-list>
  83. <ons-list-header><h1>コメント</h1></ons-list-header>
  84. </ons-list>
  85.  
  86. <div class="haikei5">
  87. <ons-list-item>
  88. <ons-col width="30%"> <h6>コメント</h6> </ons-col>
  89. <ons-col><h4>{{ patient.Comment1 }}</h4></ons-col>
  90. </ons-list-item>
  91. </div>
  92.  
  93.  
  94. </ons-list>
  95. </ons-page>
                             図2:患者基本情報を画面に表示させるプログラム(HTML)

次に、javaを図3のように修正した。
JS
  1. Patient.get()
  2. .then(
  3. function(patient){
  4. that.Patient_ID = patient.Patient_ID;
  5. that.WholeName = patient.WholeName;
  6. that.BirthDate = patient.BirthDate;
  7. that.Sex = patient.Sex == '1' ? '男性' : '女性';
  8. that.WholeName_inKana = patient.WholeName_inKana;
  9. that.WholeAddress1 = patient.Home_Address_Information.WholeAddress1;
  10. that.Allergy1 = patient.Allergy1;
  11. that.Infection1 = patient.Infection1;
  12. that.Contraindication1 = patient.Contraindication1;
  13. that.Comment1 = patient.Comment1;
  14. }
  15. );
  16. }])
            図3:患者基本情報を画面に表示させるプログラム(java)

そしたら、図4、図5のように、図1の患者基本情報が画面に表示された。
(分かりやすいように色付け、グルーピングした)
図4:アプリの患者基本情報の画面1

図5:アプリの患者基本情報の画面2

これで、うまく患者ID、氏名以外も患者基本情報画面に表示させれるようにできた。
あとは、それぞれで作成したプログラムを合わせて、1つの完成形のアプリにしていきたい。

0 件のコメント:

コメントを投稿

レーダーチャートの表示2

前回 レーダーチャートの表示を行うことが出来たので、今回は実際の値を代入したグラフの描画を試みる。 .controller('RaderChartController', ['$scope', 'Countries', funct...