Merge branch 'development_v2.5' into haroon_development_2.5

# Conflicts:
#	lib/config/localized_values.dart
#	lib/pages/medical/balance/confirm_payment_page.dart
#	lib/uitl/translations_delegate_base.dart
merge-requests/587/head
haroon amjad 4 years ago
commit 907181a56c

@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="25.68" height="24.095" viewBox="0 0 25.68 24.095">
<path id="family_3_" data-name="family (3)" d="M11.891,15.229v1.238a3.754,3.754,0,0,1-3.75,3.75H3.3a.428.428,0,0,1-.429-.429V17.523A2.726,2.726,0,0,1,5.6,14.8h5.868A.428.428,0,0,1,11.891,15.229Zm-3.75,5.845c-3.2,0-4.352.01-4.827,0a.428.428,0,0,0-.442.428v.794a3.712,3.712,0,1,0,7.423-.03V21.2a.428.428,0,0,0-.571-.4A4.582,4.582,0,0,1,8.142,21.074ZM14.069,35.79a4.831,4.831,0,0,1-2.429.007.214.214,0,0,0-.22.341,1.852,1.852,0,0,0,2.871-.009A.214.214,0,0,0,14.069,35.79Zm1.878-.323h-.088a.423.423,0,0,0-.4.295,2.723,2.723,0,0,1-4.948.562,2.838,2.838,0,0,1-.259-.56.429.429,0,0,0-.4-.3H9.733a2.571,2.571,0,0,0-2.571,2.571v.429a.429.429,0,0,0,.429.429h10.5a.429.429,0,0,0,.429-.429v-.429A2.571,2.571,0,0,0,15.947,35.466ZM2.877,33.893H.429A.429.429,0,0,0,0,34.321v4.145a.429.429,0,0,0,.429.429H2.877a.429.429,0,0,0,.429-.429V34.321A.429.429,0,0,0,2.877,33.893Zm7.153-6.685a.428.428,0,0,0-.226-.779l-.125,0a.354.354,0,0,0-.332.229,2.906,2.906,0,0,1-2.671,1.929A2.945,2.945,0,0,1,3.955,26.6a.259.259,0,0,0-.243-.175A3.711,3.711,0,0,0,0,30.138v2.469a.429.429,0,0,0,.429.429H2.877a.429.429,0,0,0,.429-.429v-.179a.438.438,0,0,1,.4-.442.429.429,0,0,1,.457.427v6.053a.429.429,0,0,0,.429.429H5.877a.428.428,0,0,0,.428-.436c0-.111,0-.243,0-.421a3.434,3.434,0,0,1,2.49-3.3.429.429,0,0,0,.221-.677,4.83,4.83,0,0,1,1.014-6.855Zm11.939-.781a.348.348,0,0,0-.33.241,2.754,2.754,0,0,1-2.551,1.9,2.874,2.874,0,0,1-2.581-1.926.346.346,0,0,0-.322-.217c-.1,0-.195,0-.3,0a.429.429,0,0,0-.232.779,4.829,4.829,0,0,1,1.01,6.853.429.429,0,0,0,.221.678,3.434,3.434,0,0,1,2.49,3.3c0,.178,0,.31,0,.421a.428.428,0,0,0,.428.436h1.286a.429.429,0,0,0,.429-.429V32.413a.429.429,0,0,1,.457-.427.438.438,0,0,1,.4.442v.179a.429.429,0,0,0,.429.429h2.448a.429.429,0,0,0,.429-.429V30.138A3.711,3.711,0,0,0,21.969,26.427Zm.406,7.894v4.145a.429.429,0,0,0,.429.429h2.448a.429.429,0,0,0,.429-.429V34.321a.429.429,0,0,0-.429-.429H22.8A.429.429,0,0,0,22.375,34.321Zm-3.2-19.5a5.342,5.342,0,0,0-5.389,5.336v5.314a.429.429,0,0,0,.585.4,4.556,4.556,0,0,1,.707-.207.43.43,0,0,0,.258-.679,4.627,4.627,0,0,1-.9-2.744V20.589a1.286,1.286,0,0,1,1.3-1.286,15.689,15.689,0,0,0,5.184-.809,2.018,2.018,0,0,1,2.66,1.91v1.868a4.586,4.586,0,0,1-.9,2.722.428.428,0,0,0,.248.676,4.527,4.527,0,0,1,.92.3.429.429,0,0,0,.609-.389V20.228a5.38,5.38,0,0,0-5.283-5.4ZM12.84,27.164A3.964,3.964,0,1,0,16.8,31.128a3.969,3.969,0,0,0-3.964-3.964Zm5.141-.433a.214.214,0,0,0-.2.356,1.723,1.723,0,0,0,2.713-.077.214.214,0,0,0-.226-.341A4.6,4.6,0,0,1,17.982,26.731Zm3.207-7.424a16.524,16.524,0,0,1-5.467.853.428.428,0,0,0-.433.429v1.654a3.716,3.716,0,1,0,7.431.031V20.4A1.159,1.159,0,0,0,21.189,19.307Zm-15.764,7.4a.214.214,0,0,0-.213.352,1.927,1.927,0,0,0,2.969-.066.214.214,0,0,0-.227-.343A4.576,4.576,0,0,1,5.425,26.708Z" transform="translate(0 -14.8)" fill="#989898"/>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 259 KiB

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21.035" height="25.699" viewBox="0 0 21.035 25.699">
<g id="file_4_" data-name="file (4)" transform="translate(0 0)">
<path id="Path_4376" data-name="Path 4376" d="M199.117,108.4h.751v18.461a2.228,2.228,0,0,0,2.225,2.225h13.668v.684a1.42,1.42,0,0,1-1.42,1.42H199.12a1.42,1.42,0,0,1-1.42-1.42V109.82A1.418,1.418,0,0,1,199.117,108.4Z" transform="translate(-197.7 -105.491)" fill="#989898"/>
<path id="Path_4377" data-name="Path 4377" d="M95.931,22.79H88.32a1.42,1.42,0,0,1-1.42-1.42V1.42A1.42,1.42,0,0,1,88.32,0H98.462V.47a1.378,1.378,0,0,0-.008.15V4.509a2,2,0,0,0,2,2h3.889c.04,0,.083,0,.123-.005h.494V21.371a1.42,1.42,0,0,1-1.42,1.42H95.931Zm-.287-4.825h4.962a.671.671,0,0,0,0-1.342H95.641a.671.671,0,1,0,0,1.342Zm-4.965-3.424h9.927a.671.671,0,0,0,0-1.342H90.679a.671.671,0,0,0,0,1.342Zm9.927-4.978H90.679a.671.671,0,0,0,0,1.342h9.927a.671.671,0,0,0,0-1.342Z" transform="translate(-83.924 0)" fill="#989898"/>
<path id="Path_4378" data-name="Path 4378" d="M92.626,6.481h-3.9A1.191,1.191,0,0,1,87.546,5.3V1.4a.6.6,0,0,1,.6-.6.582.582,0,0,1,.419.177L93.05,5.462A.6.6,0,0,1,92.626,6.481Z" transform="translate(-72.209 -0.779)" fill="#989898"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,3 @@
<svg id="weekly-calendar-page-symbol" xmlns="http://www.w3.org/2000/svg" width="25.034" height="25.034" viewBox="0 0 25.034 25.034">
<path id="Path_4379" data-name="Path 4379" d="M22.53,0H2.5A2.511,2.511,0,0,0,0,2.5V22.53a2.512,2.512,0,0,0,2.5,2.5H22.53a2.512,2.512,0,0,0,2.5-2.5V2.5A2.511,2.511,0,0,0,22.53,0ZM6.756,22.031H2.921V18.62H6.756v3.411Zm0-4.555H2.921v-3.41H6.756v3.41ZM6.467,3.794A1.063,1.063,0,1,1,7.529,2.731,1.062,1.062,0,0,1,6.467,3.794Zm5.406,18.237H8.039V18.62h3.834Zm0-4.555H8.039v-3.41h3.834Zm0-4.552H8.039V9.514h3.834ZM11.455,2.731a1.062,1.062,0,1,1,1.062,1.062A1.062,1.062,0,0,1,11.455,2.731Zm5.54,14.745H13.159v-3.41H17v3.41Zm0-4.552H13.159V9.514H17v3.41ZM17.5,2.731a1.062,1.062,0,1,1,1.062,1.062A1.062,1.062,0,0,1,17.5,2.731Zm4.609,14.745H18.278v-3.41h3.835Zm0-4.552H18.278V9.514h3.835Z" fill="#989898"/>
</svg>

After

Width:  |  Height:  |  Size: 838 B

@ -0,0 +1,24 @@
<svg xmlns="http://www.w3.org/2000/svg" width="39.338" height="34.687" viewBox="0 0 39.338 34.687">
<g id="ambulance_5_" data-name="ambulance (5)" transform="translate(0 -28.362)">
<g id="Group_8189" data-name="Group 8189" transform="translate(0 34.785)">
<g id="Group_8188" data-name="Group 8188">
<path id="Path_4980" data-name="Path 4980" d="M38.918,121.812l-3.485-3.107-5.29-7.305a1.252,1.252,0,0,0-1.008-.5H26.365l-1.008-3.275a1.26,1.26,0,0,0-1.217-.924H20.991a1.221,1.221,0,0,0-1.218,1.008l-.63,3.191H1.469A1.237,1.237,0,0,0,.21,112.156L0,129.915a1.237,1.237,0,0,0,1.259,1.259H4.534a4.969,4.969,0,0,0,9.656,0h8.942a4.969,4.969,0,0,0,9.656,0h5.29a1.237,1.237,0,0,0,1.259-1.259v-7.179A1.2,1.2,0,0,0,38.918,121.812ZM9.362,132.433A2.435,2.435,0,1,1,11.8,130,2.437,2.437,0,0,1,9.362,132.433Zm18.556,0A2.435,2.435,0,1,1,30.354,130,2.437,2.437,0,0,1,27.919,132.433ZM23.93,118.285v-4.87h4.534l3.569,4.87Z" transform="translate(0 -106.698)" fill="#2e303a"/>
</g>
</g>
<g id="Group_8191" data-name="Group 8191" transform="translate(21.327 28.362)">
<g id="Group_8190" data-name="Group 8190" transform="translate(0 0)">
<rect id="Rectangle_17462" data-name="Rectangle 17462" width="2.519" height="5.248" fill="#da4a54"/>
</g>
</g>
<g id="Group_8193" data-name="Group 8193" transform="translate(25.455 30.177)">
<g id="Group_8192" data-name="Group 8192" transform="translate(0 0)">
<rect id="Rectangle_17463" data-name="Rectangle 17463" width="5.416" height="2.519" transform="translate(0 3.829) rotate(-45)" fill="#da4a54"/>
</g>
</g>
<g id="Group_8195" data-name="Group 8195" transform="translate(14.112 30.196)">
<g id="Group_8194" data-name="Group 8194" transform="translate(0 0)">
<rect id="Rectangle_17464" data-name="Rectangle 17464" width="2.519" height="5.416" transform="translate(0 1.781) rotate(-45)" fill="#da4a54"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -0,0 +1,14 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33.632" height="30.862" viewBox="0 0 33.632 30.862">
<g id="a" transform="translate(0 -21.085)">
<g id="Group_10604" data-name="Group 10604" transform="translate(0 21.085)">
<g id="Group_10603" data-name="Group 10603" transform="translate(0 0)">
<path id="Path_13515" data-name="Path 13515" d="M33.07,32.61,17.656,21.4a1.279,1.279,0,0,0-1.681,0L.561,32.61A1.415,1.415,0,0,0,1.4,35.132H4.2V50.546a1.324,1.324,0,0,0,1.4,1.4h22.42a1.324,1.324,0,0,0,1.4-1.4V35.132h2.8A1.415,1.415,0,0,0,33.07,32.61ZM16.816,49.145a8.407,8.407,0,1,1,8.407-8.407A8.432,8.432,0,0,1,16.816,49.145Z" transform="translate(0 -21.085)" fill="#2e303a"/>
</g>
</g>
<g id="Group_10606" data-name="Group 10606" transform="translate(10.51 34.432)">
<g id="Group_10605" data-name="Group 10605">
<path id="Path_13516" data-name="Path 13516" d="M168.425,228.489v-4.2h-4.2v4.2h-4.2v4.2h4.2v4.2h4.2v-4.2h4.2v-4.2Z" transform="translate(-160.018 -224.285)" fill="#da4a54"/>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -0,0 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" width="36.033" height="32.32" viewBox="0 0 36.033 32.32">
<g id="Group_6982" data-name="Group 6982" transform="translate(0 0)">
<g id="Group_6964" data-name="Group 6964">
<path id="Subtraction_64" data-name="Subtraction 64" d="M807.5,957.28h-3.132a3.925,3.925,0,0,1-1.545-.314,4.019,4.019,0,0,1-2.121-2.119,3.9,3.9,0,0,1-.314-1.54V941.469a3.908,3.908,0,0,1,.314-1.543,4.014,4.014,0,0,1,2.118-2.116,3.916,3.916,0,0,1,1.54-.312h14.682a3.915,3.915,0,0,1,1.543.314,4.01,4.01,0,0,1,2.116,2.118,3.92,3.92,0,0,1,.313,1.54v2.919a3.274,3.274,0,0,0,0,6.127V953.3a3.93,3.93,0,0,1-.309,1.545,4,4,0,0,1-2.113,2.12,3.91,3.91,0,0,1-1.542.314h-3.432a10.325,10.325,0,0,0,1.118-1.11,1.034,1.034,0,0,0,.228-.817,15.093,15.093,0,0,0,2.129-4.006,14.583,14.583,0,0,0,.579-2.111,10.557,10.557,0,0,0,.2-1.981,7,7,0,0,0-.313-2.292,2.991,2.991,0,0,0-.9-1.348,4.283,4.283,0,0,0-1.436-.751c-.565-.19-1.219-.34-1.91-.5h0l0-.007a1.068,1.068,0,0,0-.956-.607,1.084,1.084,0,1,0,0,2.169,1.043,1.043,0,0,0,.638-.239l.025.009h.007l.017,0c.691.159,1.236.284,1.689.431a2.958,2.958,0,0,1,1.076.549,1.844,1.844,0,0,1,.558.947,6.338,6.338,0,0,1,.16,1.631,9.146,9.146,0,0,1-.186,1.755,13.223,13.223,0,0,1-.529,1.887,14.692,14.692,0,0,1-.825,1.874,12.98,12.98,0,0,1-1.077,1.715,1.035,1.035,0,0,0-.714.346,7.34,7.34,0,0,1-1.544,1.378,3.552,3.552,0,0,1-4.162.006,7.291,7.291,0,0,1-1.543-1.371,1.035,1.035,0,0,0-.713-.346,13.038,13.038,0,0,1-1.079-1.719,14.8,14.8,0,0,1-.827-1.878,13.155,13.155,0,0,1-.53-1.89,9.167,9.167,0,0,1-.187-1.758,6.412,6.412,0,0,1,.158-1.632,1.835,1.835,0,0,1,.556-.947,2.928,2.928,0,0,1,1.077-.549c.458-.148,1.034-.28,1.7-.432l.015,0h0l.01-.009a1.072,1.072,0,0,0,.652.24,1.084,1.084,0,1,0,0-2.168,1.052,1.052,0,0,0-.575.171,1.176,1.176,0,0,0-.393.434h0l-.014,0c-2.842.656-4.557,1.051-4.557,4.893a10.584,10.584,0,0,0,.2,1.983,14.543,14.543,0,0,0,.583,2.115,14.983,14.983,0,0,0,2.146,4.013,1.028,1.028,0,0,0,.229.816,10.456,10.456,0,0,0,1.105,1.1h0Zm1.9-11.264a.588.588,0,0,0-.592.561v4.632a.585.585,0,0,0,.591.559h4.563a.588.588,0,0,0,.594-.559v-4.623a.565.565,0,0,0-.18-.4.621.621,0,0,0-.417-.169Zm26.359,9.2h-1.607a1.387,1.387,0,0,1-.718-.208l-6.684-4.219a.66.66,0,0,1-.309-.556v-.419a3.27,3.27,0,0,0,0-4.712v-.742a.661.661,0,0,1,.309-.557l6.684-4.219a1.322,1.322,0,0,1,.718-.209h1.607a.661.661,0,0,1,.665.657v14.528a.65.65,0,0,1-.193.464.665.665,0,0,1-.471.191Z" transform="translate(-800.388 -937.498)" fill="#2e303a"/>
<path id="Path_656" data-name="Path 656" d="M894.195,1023.524l-.051,13.538c0,3.014-2.447,6.151-5.461,6.151a5.464,5.464,0,0,1-5.461-5.461l-.091-4.43c1.43-.191-2.655-.191-1.227,0l.079,4.43a6.707,6.707,0,0,0,6.7,6.693c3.69,0,6.687-3.692,6.687-7.383l.051-13.538C897.162,1023.233,892.453,1023.234,894.195,1023.524Z" transform="translate(-871.015 -1012.125)" fill="#de5c5d"/>
<path id="Path_663" data-name="Path 663" d="M970.188,998.3a1.9,1.9,0,1,1-1.9,1.9h0A1.9,1.9,0,0,1,970.188,998.3Z" transform="translate(-946.411 -990.378)" fill="#de5c5d"/>
<path id="Subtraction_64-2" data-name="Subtraction 64" d="M807.5,957.28h-3.132a3.925,3.925,0,0,1-1.545-.314,4.019,4.019,0,0,1-2.121-2.119,3.9,3.9,0,0,1-.314-1.54V941.469a3.908,3.908,0,0,1,.314-1.543,4.014,4.014,0,0,1,2.118-2.116,3.916,3.916,0,0,1,1.54-.312h14.682a3.915,3.915,0,0,1,1.543.314,4.01,4.01,0,0,1,2.116,2.118,3.92,3.92,0,0,1,.313,1.54v2.919a3.274,3.274,0,0,0,0,6.127V953.3a3.93,3.93,0,0,1-.309,1.545,4,4,0,0,1-2.113,2.12,3.91,3.91,0,0,1-1.542.314h-3.432a10.325,10.325,0,0,0,1.118-1.11,1.034,1.034,0,0,0,.228-.817,15.093,15.093,0,0,0,2.129-4.006,14.583,14.583,0,0,0,.579-2.111,10.557,10.557,0,0,0,.2-1.981,7,7,0,0,0-.313-2.292,2.991,2.991,0,0,0-.9-1.348,4.283,4.283,0,0,0-1.436-.751c-.565-.19-1.219-.34-1.91-.5h0l0-.007a1.068,1.068,0,0,0-.956-.607,1.084,1.084,0,1,0,0,2.169,1.043,1.043,0,0,0,.638-.239l.025.009h.007l.017,0c.691.159,1.236.284,1.689.431a2.958,2.958,0,0,1,1.076.549,1.844,1.844,0,0,1,.558.947,6.338,6.338,0,0,1,.16,1.631,9.146,9.146,0,0,1-.186,1.755,13.223,13.223,0,0,1-.529,1.887,14.692,14.692,0,0,1-.825,1.874,12.98,12.98,0,0,1-1.077,1.715,1.035,1.035,0,0,0-.714.346,7.34,7.34,0,0,1-1.544,1.378,3.552,3.552,0,0,1-4.162.006,7.291,7.291,0,0,1-1.543-1.371,1.035,1.035,0,0,0-.713-.346,13.038,13.038,0,0,1-1.079-1.719,14.8,14.8,0,0,1-.827-1.878,13.155,13.155,0,0,1-.53-1.89,9.167,9.167,0,0,1-.187-1.758,6.412,6.412,0,0,1,.158-1.632,1.835,1.835,0,0,1,.556-.947,2.928,2.928,0,0,1,1.077-.549c.458-.148,1.034-.28,1.7-.432l.015,0h0l.01-.009a1.072,1.072,0,0,0,.652.24,1.084,1.084,0,1,0,0-2.168,1.052,1.052,0,0,0-.575.171,1.176,1.176,0,0,0-.393.434h0l-.014,0c-2.842.656-4.557,1.051-4.557,4.893a10.584,10.584,0,0,0,.2,1.983,14.543,14.543,0,0,0,.583,2.115,14.983,14.983,0,0,0,2.146,4.013,1.028,1.028,0,0,0,.229.816,10.456,10.456,0,0,0,1.105,1.1h0Zm28.256-2.069h-1.607a1.387,1.387,0,0,1-.718-.208l-6.684-4.219a.66.66,0,0,1-.309-.556v-.419a3.27,3.27,0,0,0,0-4.712v-.742a.661.661,0,0,1,.309-.557l6.684-4.219a1.322,1.322,0,0,1,.718-.209h1.607a.661.661,0,0,1,.665.657v14.528a.65.65,0,0,1-.193.464.665.665,0,0,1-.471.191Z" transform="translate(-800.388 -937.498)" fill="#2e303a"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="31" height="31" viewBox="0 0 31 31">
<g id="Group_10602" data-name="Group 10602" transform="translate(-44.848 -10.426)">
<g id="Rectangle_18131" data-name="Rectangle 18131" transform="translate(44.848 10.426)" fill="#359846" stroke="#fff" stroke-width="1.25">
<rect width="31" height="31" rx="4" stroke="none"/>
<rect x="0.625" y="0.625" width="29.75" height="29.75" rx="3.375" fill="none"/>
</g>
<g id="pharmacy" transform="translate(51.361 16.275)">
<path id="Path_13509" data-name="Path 13509" d="M26.985,3H18.333A.333.333,0,0,0,18,3.333V9.989a.333.333,0,0,0,.333.333h8.652a.333.333,0,0,0,.333-.333V3.333A.333.333,0,0,0,26.985,3Zm-2,4.326a.333.333,0,0,1-.333.333h-1v1a.333.333,0,0,1-.333.333H21.993a.333.333,0,0,1-.333-.333v-1h-1a.333.333,0,0,1-.333-.333V6a.333.333,0,0,1,.333-.333h1v-1a.333.333,0,0,1,.333-.333h1.331a.333.333,0,0,1,.333.333v1h1A.333.333,0,0,1,24.989,6Z" transform="translate(-13.673 -3)" fill="#fff"/>
<path id="Path_13510" data-name="Path 13510" d="M22.1,36.706a2.769,2.769,0,0,1-1.784-.646,2.769,2.769,0,0,1-1.784.646,3.545,3.545,0,0,1-2.542-.646,2.769,2.769,0,0,1-1.784.646,3.545,3.545,0,0,1-2.542-.646,3.545,3.545,0,0,1-2.542.646A2.782,2.782,0,0,1,8,36.469v7.558a.333.333,0,0,0,.333.333H10V38.37a.333.333,0,0,1,.333-.333h4.326a.333.333,0,0,1,.333.333v5.99h8.652a.333.333,0,0,0,.333-.333V36.469A4.28,4.28,0,0,1,22.1,36.706Zm-.453,5.325a.333.333,0,0,1-.333.333H16.652a.333.333,0,0,1-.333-.333V38.37a.333.333,0,0,1,.333-.333h4.659a.333.333,0,0,1,.333.333Z" transform="translate(-7.001 -25.058)" fill="#fff"/>
<path id="Path_13511" data-name="Path 13511" d="M9.324,17.6a1,1,0,0,1-.666-.938V13H6.329a.333.333,0,0,0-.333.27l-1,5.2a.456.456,0,0,0,0,.063,2.117,2.117,0,0,0,2.117,2.117h.759a2.113,2.113,0,0,0,1.451-.576Z" transform="translate(-4.997 -9.672)" fill="#fff"/>
<path id="Path_13512" data-name="Path 13512" d="M23.661,27H20v2.419A2.113,2.113,0,0,0,21.451,30h.759a2.113,2.113,0,0,0,1.451-.576Z" transform="translate(-15.007 -19.013)" fill="#fff"/>
<path id="Path_13513" data-name="Path 13513" d="M36.661,27H33v2.419A2.113,2.113,0,0,0,34.451,30h.759a2.113,2.113,0,0,0,1.451-.576Z" transform="translate(-23.681 -19.013)" fill="#fff"/>
<path id="Path_13514" data-name="Path 13514" d="M50.326,18.474l-1-5.2A.333.333,0,0,0,49,13H46.666v3.661A1,1,0,0,1,46,17.6v2.479a2.113,2.113,0,0,0,1.451.576h.759a2.117,2.117,0,0,0,2.117-2.117.455.455,0,0,0,0-.063Z" transform="translate(-32.355 -9.672)" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 118.92 135.06"><circle cx="59.46" cy="67.53" r="38.32" style="fill:#cc121c"/><path d="M63.49,13.32h0a7.27,7.27,0,1,0-8.06,0h0c4.37,3.29,3.91,10.91-1.77,16.59h11.6C59.58,24.23,59.12,16.61,63.49,13.32Z" style="fill:#cc121c"/><path d="M14.53,36.94h0a7.28,7.28,0,1,0-4,7h0c5-2.14,11.4,2.06,13.48,9.83l2.9-5,2.9-5C22,45.78,15.19,42.36,14.53,36.94Z" style="fill:#cc121c"/><path d="M10.5,91.15h0a7.27,7.27,0,1,0,4,7h0c.66-5.43,7.49-8.84,15.25-6.76l-2.9-5-2.9-5C21.9,89.08,15.52,93.29,10.5,91.15Z" style="fill:#cc121c"/><path d="M55.43,121.74h0a7.27,7.27,0,1,0,8.06,0h0c-4.37-3.28-3.91-10.9,1.77-16.59H53.66C59.34,110.84,59.8,118.46,55.43,121.74Z" style="fill:#cc121c"/><path d="M104.39,98.13h0a7.27,7.27,0,1,0,4-7h0c-5,2.14-11.4-2.07-13.48-9.83l-2.9,5-2.9,5C96.9,89.29,103.73,92.7,104.39,98.13Z" style="fill:#cc121c"/><path d="M108.42,43.92h0a7.27,7.27,0,1,0-4-7h0c-.66,5.42-7.49,8.84-15.25,6.76l2.9,5,2.9,5C97,46,103.39,41.78,108.42,43.92Z" style="fill:#cc121c"/><path d="M81.13,34.18h0A5.32,5.32,0,1,0,76,31.34h0c1.64,3.64-1.33,8.37-7,10l3.72,2,3.73,2C74.78,39.8,77.17,34.75,81.13,34.18Z" style="fill:#cc121c"/><path d="M41.41,32.09h0a5.32,5.32,0,1,0-5,3.06h0c4,.39,6.58,5.34,5.18,11.05L45.18,44l3.63-2.21C43.1,40.4,39.92,35.8,41.41,32.09Z" style="fill:#cc121c"/><path d="M19.74,65.44h0a5.32,5.32,0,1,0,.13,5.89h0c2.33-3.25,7.91-3,12.16,1l-.09-4.24-.09-4.25C27.78,68.13,22.21,68.59,19.74,65.44Z" style="fill:#cc121c"/><path d="M37.79,100.89h0A5.32,5.32,0,1,0,43,103.72h0c-1.64-3.64,1.33-8.37,7-10l-3.72-2-3.73-2C44.14,95.27,41.75,100.32,37.79,100.89Z" style="fill:#cc121c"/><path d="M77.51,103h0a5.33,5.33,0,1,0,5-3h0c-4-.4-6.58-5.34-5.18-11l-3.63,2.2-3.63,2.2C75.82,94.67,79,99.26,77.51,103Z" style="fill:#cc121c"/><path d="M99.18,69.62h0a5.32,5.32,0,1,0-.13-5.89h0c-2.33,3.24-7.91,3-12.16-1L87,66.94l.09,4.24C91.14,66.93,96.71,66.48,99.18,69.62Z" style="fill:#cc121c"/><path d="M65.73,44.73a6.28,6.28,0,1,1-6.27-6.28A6.27,6.27,0,0,1,65.73,44.73Z" style="fill:#fff"/><path d="M52.27,54.88a3.86,3.86,0,1,1-5.46,0A3.86,3.86,0,0,1,52.27,54.88Z" style="fill:#fff"/><path d="M36.66,61.26a6.28,6.28,0,1,1-6.28,6.27A6.27,6.27,0,0,1,36.66,61.26Z" style="fill:#fff"/><path d="M46.81,74.72a3.86,3.86,0,1,1,0,5.47A3.87,3.87,0,0,1,46.81,74.72Z" style="fill:#fff"/><path d="M53.18,90.33a6.28,6.28,0,1,1,6.28,6.28A6.28,6.28,0,0,1,53.18,90.33Z" style="fill:#fff"/><circle cx="69.38" cy="77.46" r="3.86" style="fill:#fff"/><path d="M82.26,73.81a6.28,6.28,0,1,1,6.28-6.28A6.28,6.28,0,0,1,82.26,73.81Z" style="fill:#fff"/><path d="M72.11,60.34a3.86,3.86,0,1,1,0-5.46A3.86,3.86,0,0,1,72.11,60.34Z" style="fill:#fff"/></svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,82 @@
import 'package:flutter/cupertino.dart';
import '../google-analytics.dart';
class AdvancePayments{
final GALogger logger;
AdvancePayments(this.logger);
// R038
payment_services({@required String service_type}){
logger('payment_services', parameters: {
'service_type' : service_type
});
}
// R039
wallet_recharge({@required String service_type}){
logger('wallet_recharge', parameters: {
'service_type' : service_type
});
}
// R040
wallet_payment_details(){
logger('wallet_payment_details');
}
// R041
payment_method({@required String method,type}){
logger('payment_method', parameters: {
'payment_method' : method,
'payment_type' : type
});
}
// R042
payment_confirm({@required String method,type}){
logger('payment_confirm', parameters: {
'payment_method' : method,
'payment_type' : type
});
}
// R043
payment_otp_confirmation({@required String method,type}){
logger('payment_otp_confirmation', parameters: {
'payment_method' : method,
'payment_type' : type
});
}
// R044
payment_confirm_card_details({@required String method,type}){
logger('payment_confirm_card_details', parameters: {
'payment_method' : method,
'payment_type' : type
});
}
// R045
payment_pay({@required String method,type}){
logger('payment_pay', parameters: {
'payment_method' : method,
'payment_type' : type
});
}
// R046
payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){
logger('payment_success', parameters: {
'appointment_type' : appointment_type,
'clinic_type_online' : clinic,
'payment_method' : payment_method,
'payment_type' : payment_type,
'hospital_name' : hospital,
'transaction_number' : txn_number,
'transaction_amount' : txn_amount,
'transaction_currency' : txn_currency
});
}
}

@ -0,0 +1,13 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
class AppNav{
final name = 'app_nav';
final GALogger logger;
AppNav(this.logger);
logNavName(String value){
logger(name, parameters: {
'nav_name' : value
});
}
}

@ -0,0 +1,222 @@
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../google-analytics.dart';
class Appointment{
final GALogger logger;
Appointment(this.logger);
// R015
book_appointment(){
logger('book_appointment');
}
// R016.1, R017.2
book_appointment_by_clinic(){
logger('book_appointment_by_clinic');
}
// R016.2, R018.2
book_appointment_by_doctor(){
logger('book_appointment_by_doctor');
}
// R017.1
book_appointment_doctor_search({@required String query}){
// doctor_search_query : value
logger('book_appointment_doctor_search', parameters: {
'doctor_search_query' : query
});
}
// R018.1
book_appointment_select_clinic({@required String appointment_type, clinic}){
// appointment_type: regular | livecare
// clinic_type : $clinic_type
logger('book_appointment_select_clinic', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : clinic
});
}
// R019.1
book_appointment_livecare_accept(){
logger('book_appointment_livecare_accept');
}
// R019.2
book_appointment_livecare_decline(){
logger('book_appointment_livecare_decline');
}
// R020
book_appointment_chief_complaints({@required String appointment_type, clinic, hospital, treatment}){
logger('book_appointment_chief_complaints', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : clinic,
'hospital_name' : hospital,
'treatment_type' : treatment,
});
}
// R021
book_appointment_select_doctor({@required String appointment_type, @required DoctorList doctor}){
// appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender
logger('book_appointment_select_doctor', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
});
}
// R022
book_appointment_schedule({@required String appointment_type, @required DoctorList doctor}){
// appointment_type, clinic_type, hospital_name, treatment_type, doctor_name, doctor_nationality, doctor_gender
logger('book_appointment_schedule', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
});
}
// R023
book_appointment_date_selection({@required String appointment_type, @required day, @required DoctorList doctor}){
logger('book_appointment_date_selection', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day
});
}
// R024.1
book_appointment_time_selection({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_time_selection', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R024.2
book_appointment_review({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_review', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R025
book_appointment_click_confirm({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_click_confirm', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R026
book_appointment_confirmation_success({@required String appointment_type, @required DateTime dateTime, @required DoctorList doctor}){
final day = DateUtil.getWeekDay(dateTime.weekday);
final time = DateUtil.formatDateToTime(dateTime);
logger('book_appointment_confirmation_success', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctor.clinicName,
'hospital_name' : doctor.projectName,
'treatment_type' : doctor.clinicName,
'doctor_name' : doctor.name,
'doctor_nationality' : doctor.nationalityName,
'doctor_gender' : doctor.gender,
'appointment_day' : day,
'appointment_hour' : time
});
}
// R027
appointment_reminder(bool value){
logger('appointment_reminder', parameters: {
'reminder' : value ? 'yes' : 'no'
});
}
// R028
appointment_reminder_time({@required String reminde_before}){
logger('appointment_reminder_time', parameters: {
'reminder_before' : reminde_before
});
}
// R053
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
pay_now_for_appointment({@required String appointment_type, @required DoctorList doctorDetail, bool payNow = true}){
logger('pay_now_for_appointment', parameters: {
'appointment_type' : appointment_type,
'clinic_type' : doctorDetail.clinicName,
'hospital_name' : doctorDetail.projectName,
'doctor_name' : doctorDetail.name,
'payment_type' : 'appointment'
});
}
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_detail_action({@required AppoitmentAllHistoryResultList appointment, @required String action}){
logger('appointment_detail_action', parameters: {
});
}
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_details_confirm({@required AppoitmentAllHistoryResultList appointment}){
logger('appointment_details_confirm', parameters: {
});
}
// R053
// Note : - Payment flow beyond this step are same as listed under Advance Payment section of this document
appointment_details_cancel({@required AppoitmentAllHistoryResultList appointment}){
logger('appointment_details_cancel', parameters: {
});
}
}

@ -0,0 +1,8 @@
import '../google-analytics.dart';
class ErrorTracking{
final GALogger logger;
ErrorTracking(this.logger);
}

@ -0,0 +1,15 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
class HamburgerMenu{
final hamburger_menu = 'hamburger_menu';
final GALogger logger;
HamburgerMenu(this.logger);
logMenuItemClick(String value){
logger(hamburger_menu, parameters: {
'menu_item' : value
});
}
}

@ -0,0 +1,13 @@
import '../google-analytics.dart';
class HMGServices{
final hmg_services = 'hmg_services';
final GALogger logger;
HMGServices(this.logger);
logServiceName(String value){
logger('hmg_services', parameters: {
'services_name' : value
});
}
}

@ -0,0 +1,101 @@
import 'package:flutter/cupertino.dart';
import '../google-analytics.dart';
class LiveCare{
final GALogger logger;
LiveCare(this.logger);
// R030.1
livecare_immediate_consultation(){
logger('livecare_immediate_consultation');
}
// R030.2
livecare_schedule_video_call(){
logger('livecare_schedule_video_call');
}
// R031.1
livecare_clinic_schedule({@required String clinic}){
logger('livecare_clinic_schedule', parameters: {
'clinic_type_online' : clinic
});
}
// R031.2
livecare_immediate_consultation_clinic({@required String clinic}){
logger('livecare_immediate_consultation_clinic', parameters: {
'clinic_type_online' : clinic
});
}
// R031.2
livecare_schedule_video_call_clinic({@required String clinic}){
logger('livecare_schedule_video_call_clinic', parameters: {
'clinic_type_online' : clinic
});
}
// R032
livecare_immediate_consultation_TnC({@required String clinic}){
logger('livecare_immediate_consultation_TnC', parameters: {
'clinic_type_online' : clinic
});
}
// R033
payment_method({@required String appointment_type, clinic, payment_method, payment_type}){
logger('payment_method', parameters: {
'appointment_type' : appointment_type,
'clinic_type_online' : clinic,
'payment_method' : payment_method,
'payment_type' : payment_type
});
}
// R034
payment_confirm({@required String appointment_type, clinic, payment_method, payment_type}){
logger('payment_confirm', parameters: {
'appointment_type' : appointment_type,
'clinic_type_online' : clinic,
'payment_method' : payment_method,
'payment_type' : payment_type
});
}
// R035
payment_pay({@required String appointment_type, clinic, hospital, payment_method, payment_type}){
// logger('payment_pay', parameters: {
// 'appointment_type' : appointment_type,
// 'clinic_type_online' : clinic,
// 'payment_method' : payment_method,
// 'payment_type' : payment_type,
// 'hospital_name' : hospital
// });
}
// R036
payment_success({@required String appointment_type, clinic, hospital, payment_method, payment_type, txn_number, txn_amount, txn_currency}){
// appointment_type
// clinic_type_online
// payment_method
// payment_type
// hospital_name
// transaction_number
// transaction_amount
// transaction_currency
}
// R037
livecare_immediate_consultation_payment_failed({@required String appointment_type, clinic, hospital, payment_method, payment_type, error_code, error_message}){
// appointment_type
// clinic_type_online
// payment_method
// payment_type
// hospital_name
// error_code
// error_message
}
}

@ -0,0 +1,103 @@
import 'package:flutter/cupertino.dart';
import '../google-analytics.dart';
class LoginRegistration{
final GALogger logger;
LoginRegistration(this.logger);
// R004.1
login_register_initiate(){
logger('login_register_initiate');
}
// R005.1
visited_alhabib_group(bool value){
// selection_type: yes/no
logger('visited_alhabib_group', parameters: {
'selection_type' : value ? 'yes' : 'no'
});
}
// R006.1, R007.1, R008.1, R009.1
registration_cancel({@required String step}){
// registration_step : enter details
// registration_step : personal info
// registration_step : patient info
// fourth (verification)
logger('registration_cancel', parameters: {
'registration_step' : step
});
}
// R006.2
registration_enter_details(){
logger('registration_enter_details');
}
// R007.2
registration_personal_info(){
logger('registration_personal_info');
}
// R008.2
registration_patient_info(){
logger('registration_patient_info');
}
// R009.2
registration_verification_option(){
logger('registration_verification_option');
}
// R010
registration_confirmation({@required String by}){
// verification_method: by
logger('registration_confirmation', parameters: {
'verification_method' : by
});
}
// R011.1
login_start({@required String method}){
logger('login_start', parameters: {
'login_method' : method
});
}
// R011.2
forget_file_number(){
logger('forget_file_number');
}
// R011.3
register_now({@required String method}){
logger('register_now', parameters: {
'login_method' : method
});
}
// R012.1, R014.1
login_successful({@required String method}){
logger('login_successful', parameters: {
'login_method' : method
});
}
// R012.4
login_unsuccessful({@required String method, error}){
logger('login_unsuccessful', parameters: {
'login_method' : method
});
}
// R013
recover_file_number(){
logger('recover_file_number');
}
// R014.2
login_with_other_account(){
logger('login_with_other_account');
}
}

@ -0,0 +1,9 @@
import '../google-analytics.dart';
class OfferAndPromotion{
final GALogger logger;
OfferAndPromotion(this.logger);
final offers_and_promotion = 'offers_&_promotion';
}

@ -0,0 +1,119 @@
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import '../google-analytics.dart';
class TodoList{
final GALogger logger;
TodoList(this.logger);
// R047.1
to_do_list_pay_now(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_pay_now', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R047.2
to_do_list_more_details(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_more_details', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R048
to_do_list_confirm_payment_details(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_confirm_payment_details', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R048
to_do_list_cancel_payment_details(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_cancel_payment_details', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R049.1 // should be for appointment flow
// to_do_list_appointment_actions(AppoitmentAllHistoryResultList appointment, action){
// logger('to_do_list_pay_now', parameters: {
// 'appointment_type' : appointment.appointmentType,
// 'clinic_type_online' : appointment.clinicName,
// 'hospital_name' : appointment.projectName,
// 'doctor_name' : appointment.doctorName,
// 'payment_type' : appointment.patientType,
// });
// }
// R049.2
to_do_list_cancel_appointment(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_cancel_appointment', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R049.3
to_do_list_confirm_appointment(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_confirm_appointment', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R050
to_do_list_check_in(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_check_in', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R051
to_do_list_nfc(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_nfc', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
// R052
to_do_list_nfc_cancel(AppoitmentAllHistoryResultList appointment){
logger('to_do_list_nfc_cancel', parameters: {
'appointment_type' : appointment.appointmentType,
'clinic_type_online' : appointment.clinicName,
'hospital_name' : appointment.projectName,
'doctor_name' : appointment.doctorName,
'payment_type' : appointment.patientType,
});
}
}

@ -1,4 +1,13 @@
import 'package:diplomaticquarterapp/analytics/analytic-events.dart';
import 'package:diplomaticquarterapp/analytics/flows/advance_payments.dart';
import 'package:diplomaticquarterapp/analytics/flows/appointments.dart';
import 'package:diplomaticquarterapp/analytics/flows/error_tracking.dart';
import 'package:diplomaticquarterapp/analytics/flows/hamburger_menu.dart';
import 'package:diplomaticquarterapp/analytics/flows/live_care.dart';
import 'package:diplomaticquarterapp/analytics/flows/login_registration.dart';
import 'package:diplomaticquarterapp/analytics/flows/offers_promotions.dart';
import 'package:diplomaticquarterapp/analytics/flows/todo_list.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:firebase_analytics/firebase_analytics.dart';
@ -6,29 +15,61 @@ import 'package:firebase_analytics/observer.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class Singleton {
const Singleton(); //Constant constructor
import 'flows/app_nav.dart';
import 'flows/hmg_services.dart';
void hello() {
print('Hello world');
typedef GALogger = Function(String name, {Map<String,dynamic> parameters});
var _analytics = FirebaseAnalytics();
_logger(String name, {Map<String,dynamic> parameters}) async {
if (name != null && name.isNotEmpty) {
if(name.contains(' '))
name = name.replaceAll(' ','_');
_analytics
.logEvent(name: name.trim(), parameters: parameters)
.then((value) {
debugPrint('SUCCESS: Google analytics event "$name" sent');
}).catchError((error) {
debugPrint('ERROR: Google analytics event "$name" sent failed');
});
}
}
var analytics = FirebaseAnalytics();
class GAnalytics {
const GAnalytics();
static GAnalytics shared = const GAnalytics();
setUser(AuthenticatedUser user){
if(user != null){
_analytics.setUserProperty(name: 'user_country', value: user.iSOCountryID);
_analytics.setUserProperty(name: 'user_language', value: user.preferredLanguage);
_analytics.setUserProperty(name: 'userid', value: user.patientID.toString() );
_analytics.setUserProperty(name: 'login_status', value: 'yes');
}
}
NavObserver navObserver() => NavObserver();
final hamburgerMenu = HamburgerMenu(_logger);
final bottomTabNavigation = AppNav(_logger);
final hmgServices = HMGServices(_logger);
final loginRegistration = LoginRegistration(_logger);
final appointment = Appointment(_logger);
final liveCare = LiveCare(_logger);
final todoList = TodoList(_logger);
final advancePayments = AdvancePayments(_logger);
final offerPackages = OfferAndPromotion(_logger);
final errorTracking = ErrorTracking(_logger);
}
// adb shell setprop debug.firebase.analytics.app com.ejada.hmg -> Android
class NavObserver extends RouteObserver<PageRoute<dynamic>> {
_sendScreenView(PageRoute route) async {
log(String className) {
var event = AnalyticEvents.get(className);
if (event.active != null) {
analytics
_analytics
.setCurrentScreen(
screenName: event.flutterName(), screenClassOverride: className)
.catchError(

@ -259,7 +259,13 @@ const GET_PATIENT_SHARE =
//URL to get patient appointment history
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory_Async";
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const GET_OBGYNE_ORDERS_LIST =
"services/Patients.svc/REST/HIS_OBGYNEProcedureGet";
const GET_OBGYNE_DOCTORS_LIST =
"services/Doctors.svc/REST/HIS_ObgyneUltrasoundDoctors";
const DOCTOR_SCHEDULE_URL =
'Services/Doctors.svc/REST/GetDoctorWorkingHoursTable';

@ -53,7 +53,7 @@ const Map localizedValues = {
'noResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج '},
'noSearchResultFound': {'en': 'No Result Found', 'ar': 'لم يتم العثور على نتائج الرجاء تغيير لغة البحث'},
'pleaseEnterProductName': {'en': 'Please Enter Product Name', 'ar': 'ادخل اسم المنتج'},
'bookNow': {'en': 'BOOK NOW', 'ar': 'احجز الآن'},
'bookNow': {'en': 'Book Now', 'ar': 'احجز الآن'},
'docInfo': {'en': 'Doctor Information', 'ar': 'معلومات الطبيب'},
'appoInfo': {'en': 'Appointment Information', 'ar': 'معلومات الموعد'},
'availableAppo': {'en': 'Available Appointments', 'ar': 'المواعيد المتاحة'},
@ -1751,5 +1751,5 @@ const Map localizedValues = {
"covidTestTodo": {"en": "Covid-19 Test", "ar": "فحص كورونا"},
"ancillaryOrdersPaymentConfirm": {"en": "Are you sure you want to make payment for selected orders?", "ar": "هل أنت متأكد أنك تريد سداد قيمة الطلبات المختارة؟"},
"successRegister": {"en": "Your account has been created.", "ar": "لقد تم إنشاء حسابك."},
"ancillaryOrderPaymentSuccess": {"en": "Your payment has been successfully made. Your invoice no. is: ", "ar": "تم الدفع الخاص بك بنجاح. فاتورتك لا. يكون: "},
"pharmacyLiveCare": {"en": "Pharmacy LiveCare", "ar": "لايف كير صيدلية"},
};

@ -13,6 +13,7 @@ class LakumInquiryInformationObjVersion {
num expiredPoints;
String expiryDate;
num gainedPoints;
num gainedPointsAmount;
List<PointsAmountPerYear> gainedPointsAmountPerYear;
List<PointsDetails> gainedPointsDetails;
String lakumMessageStatus;
@ -44,6 +45,7 @@ class LakumInquiryInformationObjVersion {
this.expiredPoints,
this.expiryDate,
this.gainedPoints,
this.gainedPointsAmount,
this.gainedPointsAmountPerYear,
this.gainedPointsDetails,
this.lakumMessageStatus,
@ -85,6 +87,7 @@ class LakumInquiryInformationObjVersion {
expiredPoints = json['ExpiredPoints'];
expiryDate = json['ExpiryDate'];
gainedPoints = json['GainedPoints'];
gainedPointsAmount = json['GainedPointsAmount'];
if (json['GainedPointsAmountPerYear'] != null) {
gainedPointsAmountPerYear = new List<PointsAmountPerYear>();
json['GainedPointsAmountPerYear'].forEach((v) {
@ -144,6 +147,7 @@ class LakumInquiryInformationObjVersion {
data['ExpiredPoints'] = this.expiredPoints;
data['ExpiryDate'] = this.expiryDate;
data['GainedPoints'] = this.gainedPoints;
data['GainedPointsAmount'] = this.gainedPointsAmount;
if (this.gainedPointsAmountPerYear != null) {
data['GainedPointsAmountPerYear'] =
this.gainedPointsAmountPerYear.map((v) => v).toList();

@ -124,12 +124,12 @@ class BaseAppClient {
// body['IdentificationNo'] = 2076117163;
// body['MobileNo'] = "966503109207";
// body['PatientID'] = 3648586; //3844083
// body['TokenID'] = "@dm!n";
body['PatientID'] = 2380476; //3844083
body['TokenID'] = "@dm!n";
// Patient ID: 2478442
// Mobile no.: 0503109207
// ID: 2076117163
// Patient ID: 3027574
// Mobile no.: 0502303285
// ID: 119116817
body.removeWhere((key, value) => key == null || value == null);

@ -12,12 +12,12 @@ class LacumService extends BaseService{
LacumAccountInformation lacumInformation;
LacumAccountInformation lacumGroupInformation;
Future getLacumAccountInformation() async {
Future getLacumAccountInformation(String identificationNo) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['IdentificationNo'] = user.patientIdentificationNo;
body['IdentificationNo'] = identificationNo;
try {
await baseAppClient.post(GET_LACUM_ACCOUNT_INFORMATION,
@ -32,12 +32,12 @@ class LacumService extends BaseService{
}
}
Future getLacumGroupInformation() async {
Future getLacumGroupInformation(String identificationNo) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['IdentificationNo'] = user.patientIdentificationNo;
body['IdentificationNo'] = identificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}";
body['IsDetailsRequired'] = true;

@ -22,14 +22,14 @@ class LacumViewModel extends BaseViewModel {
String get successMsg =>
_lacumService.successMsg;
Future getLacumData() async {
await getLacumAccountData();
getLacumGroupData();
Future getLacumData(String identificationNo) async {
await getLacumAccountData(identificationNo);
getLacumGroupData(identificationNo);
}
Future getLacumAccountData() async {
Future getLacumAccountData(String identificationNo) async {
setState(ViewState.Busy);
await _lacumService.getLacumAccountInformation();
await _lacumService.getLacumAccountInformation(identificationNo);
if (_lacumService.hasError) {
error = _lacumService.error;
setState(ViewState.Error);
@ -38,9 +38,9 @@ class LacumViewModel extends BaseViewModel {
}
}
Future getLacumGroupData() async {
Future getLacumGroupData(String identificationNo) async {
setState(ViewState.Busy);
await _lacumService.getLacumGroupInformation();
await _lacumService.getLacumGroupInformation(identificationNo);
if (_lacumService.hasError) {
error = _lacumService.error;
setState(ViewState.Error);
@ -49,7 +49,7 @@ class LacumViewModel extends BaseViewModel {
}
}
Future makeAccountActivate() async {
Future makeAccountActivate(String identificationNo) async {
setState(ViewState.Busy);
await _lacumService.makeAccountActivate();
if (_lacumService.hasError) {
@ -57,11 +57,11 @@ class LacumViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
lacumGroupInformation.lakumInquiryInformationObjVersion.accountStatus = "Active";
getLacumAccountData();
getLacumAccountData(identificationNo);
}
}
Future makeAccountDeactivate() async {
Future makeAccountDeactivate(String identificationNo) async {
setState(ViewState.Busy);
await _lacumService.makeAccountDeactivate();
if (_lacumService.hasError) {
@ -69,7 +69,7 @@ class LacumViewModel extends BaseViewModel {
setState(ViewState.Error);
} else {
lacumGroupInformation.lakumInquiryInformationObjVersion.accountStatus = "Cancelled";
getLacumAccountData();
getLacumAccountData(identificationNo);
}
}

@ -1,9 +1,11 @@
import 'dart:async';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/privilege/PrivilegeModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/uitl/PlatformBridge.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/cupertino.dart';
@ -11,6 +13,9 @@ import 'package:flutter_datetime_picker/flutter_datetime_picker.dart';
var isAppArabic = false;
class ProjectViewModel extends BaseViewModel {
GAnalytics get analytics => locator<GAnalytics>();
// Platform Bridge
PlatformBridge platformBridge() {
return PlatformBridge.shared();

@ -24,6 +24,7 @@ import 'package:diplomaticquarterapp/uitl/navigation_service.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:get_it/get_it.dart';
import 'analytics/google-analytics.dart';
import 'core/service/AlHabibMedicalService/cmc_service.dart';
import 'core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'core/service/AlHabibMedicalService/e_referral_service.dart';
@ -325,4 +326,10 @@ void setupLocator() {
() => GeofencingServices()); // Geofencing Services
locator.registerFactory(() => TermsConditionsViewModel());
locator.registerFactory(() => AnciallryOrdersViewModel());
// Google/Firebase Analytics
// ---------------------------
locator.registerFactory(() => GAnalytics());
}

@ -77,10 +77,10 @@ class _MyApp extends State<MyApp> {
LocalNotification.getInstance().showNow(title: "Payload", subtitle: payload, payload: payload);
});
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
// SystemChrome.setPreferredOrientations([
// DeviceOrientation.portraitUp,
// DeviceOrientation.portraitDown,
// ]);
// final themeNotifier = Provider.of<ThemeNotifier>(context);
precacheImage(AssetImage('assets/images/powerd-by.jpg'), context);
return LayoutBuilder(

@ -1,22 +1,22 @@
class DoctorList {
int clinicID;
num clinicID;
String clinicName;
String doctorTitle;
int iD;
num iD;
String name;
int projectID;
num projectID;
String projectName;
int actualDoctorRate;
int clinicRoomNo;
num actualDoctorRate;
num clinicRoomNo;
dynamic date;
dynamic appointmentDate;
dynamic dayName;
int doctorID;
num doctorID;
String doctorImageURL;
dynamic doctorProfile;
dynamic doctorProfileInfo;
int doctorRate;
int gender;
num doctorRate;
num gender;
String genderDescription;
bool isAppointmentAllowed;
bool isDoctorAllowVedioCall;
@ -30,13 +30,13 @@ class DoctorList {
String nationalityID;
String nationalityName;
dynamic nearestFreeSlot;
int noOfPatientsRate;
int originalClinicID;
int personRate;
num noOfPatientsRate;
num originalClinicID;
num personRate;
dynamic projectDistanceInKiloMeters;
String qR;
dynamic qRString;
int rateNumber;
num rateNumber;
dynamic serviceID;
String setupID;
List<String> speciality;

@ -0,0 +1,136 @@
class OBGyneProcedureListResponse {
String setupID;
int projectID;
int episodeID;
int appointmentNo;
int orderNo;
String procedureId;
int lineItemNo;
String orderDate;
int orderType;
int patientType;
int patientID;
int price;
int orderStatus;
bool isApprovalRequired;
bool isApprovalCreated;
bool isInvoiced;
bool isReferralInvoiced;
bool isEROrder;
bool isCash;
int uniqueRowID;
int status;
int clinicID;
int doctorID;
String procedureName;
String procedureNameN;
String clinicDescription;
String clinicDescriptionN;
String doctorName;
String doctorNameN;
String projectDescription;
String projectDescriptionN;
OBGyneProcedureListResponse(
{this.setupID,
this.projectID,
this.episodeID,
this.appointmentNo,
this.orderNo,
this.procedureId,
this.lineItemNo,
this.orderDate,
this.orderType,
this.patientType,
this.patientID,
this.price,
this.orderStatus,
this.isApprovalRequired,
this.isApprovalCreated,
this.isInvoiced,
this.isReferralInvoiced,
this.isEROrder,
this.isCash,
this.uniqueRowID,
this.status,
this.clinicID,
this.doctorID,
this.procedureName,
this.procedureNameN,
this.clinicDescription,
this.clinicDescriptionN,
this.doctorName,
this.doctorNameN,
this.projectDescription,
this.projectDescriptionN});
OBGyneProcedureListResponse.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID'];
projectID = json['ProjectID'];
episodeID = json['EpisodeID'];
appointmentNo = json['AppointmentNo'];
orderNo = json['OrderNo'];
procedureId = json['ProcedureId'];
lineItemNo = json['LineItemNo'];
orderDate = json['OrderDate'];
orderType = json['OrderType'];
patientType = json['PatientType'];
patientID = json['PatientID'];
price = json['Price'];
orderStatus = json['OrderStatus'];
isApprovalRequired = json['IsApprovalRequired'];
isApprovalCreated = json['IsApprovalCreated'];
isInvoiced = json['IsInvoiced'];
isReferralInvoiced = json['IsReferralInvoiced'];
isEROrder = json['IsEROrder'];
isCash = json['IsCash'];
uniqueRowID = json['UniqueRowID'];
status = json['Status'];
clinicID = json['ClinicID'];
doctorID = json['DoctorID'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
projectDescription = json['ProjectDescription'];
projectDescriptionN = json['ProjectDescriptionN'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID;
data['EpisodeID'] = this.episodeID;
data['AppointmentNo'] = this.appointmentNo;
data['OrderNo'] = this.orderNo;
data['ProcedureId'] = this.procedureId;
data['LineItemNo'] = this.lineItemNo;
data['OrderDate'] = this.orderDate;
data['OrderType'] = this.orderType;
data['PatientType'] = this.patientType;
data['PatientID'] = this.patientID;
data['Price'] = this.price;
data['OrderStatus'] = this.orderStatus;
data['IsApprovalRequired'] = this.isApprovalRequired;
data['IsApprovalCreated'] = this.isApprovalCreated;
data['IsInvoiced'] = this.isInvoiced;
data['IsReferralInvoiced'] = this.isReferralInvoiced;
data['IsEROrder'] = this.isEROrder;
data['IsCash'] = this.isCash;
data['UniqueRowID'] = this.uniqueRowID;
data['Status'] = this.status;
data['ClinicID'] = this.clinicID;
data['DoctorID'] = this.doctorID;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['ClinicDescription'] = this.clinicDescription;
data['ClinicDescriptionN'] = this.clinicDescriptionN;
data['DoctorName'] = this.doctorName;
data['DoctorNameN'] = this.doctorNameN;
data['ProjectDescription'] = this.projectDescription;
data['ProjectDescriptionN'] = this.projectDescriptionN;
return data;
}
}

@ -1,7 +1,7 @@
class ListClinicCentralized {
int clinicID;
String clinicDescription;
Null clinicDescriptionN;
String clinicDescriptionN;
int age;
int gender;
bool isLiveCareClinicAndOnline;

@ -5,8 +5,8 @@ class ApplePayRequest {
dynamic customerEmail;
String orderdescription;
String liveServiceid;
String longitude;
String latitude;
dynamic longitude;
dynamic latitude;
String devicetoken;
String clientrequestid;
String projectid;

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
@ -26,6 +27,7 @@ import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'book_reminder_page.dart';
import 'components/DocAvailableAppointments.dart';
class BookConfirm extends StatefulWidget {
DoctorList doctor;
@ -47,6 +49,7 @@ class BookConfirm extends StatefulWidget {
}
class _BookConfirmState extends State<BookConfirm> {
ProjectViewModel projectViewModel;
ToDoCountProviderModel toDoProvider;
AppSharedPreferences sharedPref = new AppSharedPreferences();
@ -63,6 +66,7 @@ class _BookConfirmState extends State<BookConfirm> {
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold(
appBarTitle: widget.doctor.doctorTitle + " " + widget.doctor.name,
isShowDecPage: false,
@ -266,10 +270,14 @@ class _BookConfirmState extends State<BookConfirm> {
}
insertAppointment(context, DoctorList docObject) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service.insertAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
Future.delayed(new Duration(milliseconds: 500), () {
@ -307,10 +315,14 @@ class _BookConfirmState extends State<BookConfirm> {
}
insertLiveCareScheduledAppointment(context, DoctorList docObject) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_click_confirm(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
GifLoaderDialogUtils.showMyDialog(context);
AppoitmentAllHistoryResultList appo;
widget.service.insertLiveCareScheduleAppointment(docObject.doctorID, docObject.clinicID, docObject.projectID, docObject.serviceID, widget.selectedTime, widget.selectedDate, context).then((res) {
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.book_appointment_confirmation_success(appointment_type: 'livecare', dateTime: timeSlot, doctor: widget.doctor);
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
print(res['AppointmentNo']);

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:provider/provider.dart';
import 'QRCode.dart';
@ -43,8 +45,11 @@ class _BookSuccessState extends State<BookSuccess> {
AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser;
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold(
appBarTitle: widget.docObject.doctorTitle + " " + widget.docObject.name,
isShowDecPage: false,
@ -182,6 +187,7 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: true);
startPaymentProcess();
},
child: Text(TranslationBase.of(context).payNow.toUpperCase(), style: TextStyle(fontSize: 18.0)),
@ -203,6 +209,7 @@ class _BookSuccessState extends State<BookSuccess> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
projectViewModel.analytics.appointment.pay_now_for_appointment(appointment_type: 'regular', doctorDetail: widget.docObject, payNow: false);
navigateToHome(context);
},
child: Text(TranslationBase.of(context).payLater.toUpperCase(), style: TextStyle(fontSize: 18.0)),
@ -388,6 +395,7 @@ class _BookSuccessState extends State<BookSuccess> {
}
confirmAppointment(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'BookConfirm.dart';
@ -59,8 +61,11 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
super.initState();
}
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: widget.doctor.doctorTitle + " " + widget.doctor.name,
isShowAppBar: true,
@ -122,6 +127,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
showConfirmMessageDialog: false,
isNeedToShowButton: !widget.isLiveCareAppointment,
onTap: () {
projectViewModel.analytics.appointment.book_appointment_schedule(appointment_type: 'regular', doctor: widget.doctor);
Navigator.push(
context,
FadePage(
@ -490,6 +496,8 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
void goToBookConfirm() async {
if (DocAvailableAppointments.areSlotsAvailable) {
if (await sharedPref.getObject(USER_PROFILE) != null) {
final timeSlot = DocAvailableAppointments.selectedAppoDateTime;
projectViewModel.analytics.appointment.book_appointment_review(appointment_type: 'regular', dateTime: timeSlot, doctor: widget.doctor);
navigateToBookConfirm(context);
} else {
ConfirmDialog dialog = new ConfirmDialog(

@ -2,6 +2,9 @@ import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -21,11 +24,12 @@ import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
AppoitmentAllHistoryResultList appointment;
String appoQR;
AuthenticatedUser authUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
QRCode({@required this.patientShareResponse, @required this.appoQR});
QRCode({@required this.patientShareResponse, @required this.appoQR, @required this.appointment});
@override
_QRCodeState createState() => _QRCodeState();
@ -43,12 +47,8 @@ class _QRCodeState extends State<QRCode> {
_bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
FlutterNfcKit.nfcAvailability.then((value) {
setState(() {
_supportsNFC = (value == NFCAvailability.available);
});
});
FlutterNfcKit.nfcAvailability.then((value) {
_supportsNFC = (value == NFCAvailability.available);
});
super.initState();
@ -73,7 +73,7 @@ class _QRCodeState extends State<QRCode> {
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
widget.patientShareResponse.clinicID != 265
_supportsNFC
? Expanded(
flex: 1,
child: Row(
@ -92,10 +92,13 @@ class _QRCodeState extends State<QRCode> {
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
locator<ProjectViewModel>().analytics.todoList.to_do_list_nfc(widget.appointment);
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
}, onCancel: (){
locator<ProjectViewModel>().analytics.todoList.to_do_list_nfc_cancel(widget.appointment);
});
},
),

@ -0,0 +1,355 @@
import 'dart:convert';
import 'dart:typed_data';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/nfc/nfc_reader_sheet.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
class QRCode extends StatefulWidget {
PatientShareResponse patientShareResponse;
String appoQR;
AuthenticatedUser authUser;
AppSharedPreferences sharedPref = AppSharedPreferences();
QRCode({@required this.patientShareResponse, @required this.appoQR});
@override
_QRCodeState createState() => _QRCodeState();
}
class _QRCodeState extends State<QRCode> {
Uint8List _bytes;
bool _supportsNFC = false;
BuildContext _context;
@override
void initState() {
// TODO: implement initState
_bytes = base64.decode(widget.appoQR.split(',').last);
widget.authUser = new AuthenticatedUser();
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
FlutterNfcKit.nfcAvailability.then((value) {
setState(() {
_supportsNFC = (value == NFCAvailability.available);
});
});
});
super.initState();
}
@override
Widget build(BuildContext context) {
_context = context;
return AppScaffold(
appBarTitle: TranslationBase.of(context).attendRegisterCode,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
body: SingleChildScrollView(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Container(
width: double.infinity,
height: MediaQuery.of(context).size.width / 3,
child: Row(
children: [
<<<<<<< HEAD
_supportsNFC
? Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
),
onTap: () {
locator<ProjectViewModel>().analytics.todoList.to_do_list_nfc();
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
}, onCancel: (){
locator<ProjectViewModel>().analytics.todoList.to_do_list_nfc_cancel();
});
},
),
],
=======
// _supportsNFC
// ?
Expanded(
flex: 1,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
border: Border.all(color: Colors.black),
borderRadius: BorderRadius.circular(10),
),
child: Image.asset("assets/images/nfc/ic_nfc.png"),
>>>>>>> 259e27d4a7e8d7ddf751de88de36fe901df0e2da
),
onTap: () {
showNfcReader(context, onNcfScan: (String nfcId) {
Future.delayed(const Duration(milliseconds: 100), () {
sendNfcCheckInRequest(nfcId);
});
});
},
),
],
),
),
// : Container(),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(top: 30.0),
alignment: Alignment.center,
child: Image.memory(
_bytes,
),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
),
),
Container(
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 10.0, left: 40.0, bottom: 10.0),
child: Image.asset("assets/images/new-design/device_icon.png", width: MediaQuery.of(context).size.width / 3.4, height: MediaQuery.of(context).size.width / 3.4),
),
Expanded(
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).scanQRHospital, style: TextStyle(color: Colors.red[700], fontSize: 18.0, fontWeight: FontWeight.bold)),
),
),
],
),
),
Container(
margin: EdgeInsets.only(top: 10.0, left: 20.0, right: 20.0),
child: Divider(
color: Colors.red[700],
thickness: 0.8,
),
),
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(TranslationBase.of(context).appoInfo, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
Container(
margin: EdgeInsets.only(left: 20.0, bottom: 20.0, right: 20.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.grey[200],
boxShadow: [
BoxShadow(color: Colors.grey, spreadRadius: 2),
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.only(top: 15.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.doctorNameObj, style: TextStyle(fontSize: 18.0, color: Colors.grey[700], fontWeight: FontWeight.bold)),
),
if (getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality) != "null\n")
Container(
margin: EdgeInsets.only(bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(widget.patientShareResponse.projectName, style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
Container(
margin: EdgeInsets.only(top: 0.0, bottom: 10.0, left: 20.0, right: 20.0),
child: Text(getDate(widget.patientShareResponse.appointmentDate), style: TextStyle(fontSize: 18.0, color: Colors.grey[700])),
),
],
),
),
Container(
margin: EdgeInsets.only(left: 20.0, right: 20.0, top: 15.0),
alignment: Alignment.bottomCenter,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
DefaultButton(TranslationBase.of(context).sendEmail.toUpperCase(), () => {sendEmail()})
],
),
),
],
),
),
),
);
}
sendEmail() async {
DoctorsListService service = new DoctorsListService();
if (await widget.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await widget.sharedPref.getObject(USER_PROFILE));
setState(() {
widget.authUser = data;
});
}
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: "Send a copy of this QR to the email " + widget.authUser.emailAddress + "?",
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () {
GifLoaderDialogUtils.showMyDialog(context);
service
.sendAppointmentQREmail(widget.authUser.emailAddress, widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentNo.toString(),
widget.patientShareResponse.doctorNameObj, widget.patientShareResponse.projectName, widget.appoQR, getDoctorSpeciality(widget.patientShareResponse.doctorSpeciality), context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context);
ConfirmDialog.closeAlertDialog(context);
}).catchError((err) {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
Future navigateToHome(context) async {
Navigator.of(context).pushNamed(HOME);
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {}
String getDate(String appoDate) {
var appoDateFormatted = "";
var dateObj = DateUtil.convertStringToDate(appoDate);
setState(() {
appoDateFormatted = DateUtil.getWeekDay(dateObj.weekday) +
", " +
dateObj.day.toString() +
" " +
DateUtil.getMonth(dateObj.month) +
" " +
dateObj.year.toString() +
", " +
dateObj.hour.toString() +
":" +
dateObj.minute.toString() +
":00";
});
return appoDateFormatted;
}
String getDoctorSpeciality(List<String> docSpecial) {
String docSpeciality = "";
if (docSpecial != null && docSpecial.length != 0) {
docSpecial.forEach((v) {
docSpeciality = docSpeciality + v + "\n";
});
}
return docSpeciality;
}
sendNfcCheckInRequest(String nfcId) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.sendCheckinNfcRequest(widget.patientShareResponse.appointmentNo, nfcId, widget.patientShareResponse.projectID, context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
_showMyDialog(res["SuccessMsg"], this.context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
_showMyDialog(err, this.context);
});
}
Future<void> _showMyDialog(String message, BuildContext context) async {
return showDialog<void>(
context: context,
barrierDismissible: true, // user must tap button!
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Alert'),
content: SingleChildScrollView(
child: ListBody(
children: <Widget>[
Text(message),
],
),
),
actions: <Widget>[
TextButton(
child: const Text('OK'),
onPressed: () {
Navigator.of(context).pop();
},
),
],
);
},
);
}
}

@ -26,7 +26,6 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: widget.type);
super.initState();
}
@ -64,6 +63,12 @@ class _SearchState extends State<Search> with TickerProviderStateMixin {
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).clinicName), Text(TranslationBase.of(context).doctorName)],
onTap: (idx){
if(idx == 0)
projectViewModel.analytics.appointment.book_appointment_by_clinic();
else
projectViewModel.analytics.appointment.book_appointment_by_doctor();
},
),
Expanded(
child: TabBarView(

@ -1,29 +1,34 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
// import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class SearchResults extends StatefulWidget {
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital;
bool isLiveCareAppointment;
bool isObGyneAppointment;
OBGyneProcedureListResponse obGyneProcedureListResponse;
SearchResults({@required this.doctorsList, this.patientDoctorAppointmentListHospital, @required this.isLiveCareAppointment});
SearchResults({@required this.doctorsList, this.patientDoctorAppointmentListHospital, this.isObGyneAppointment = false, @required this.isLiveCareAppointment, this.obGyneProcedureListResponse});
@override
_SearchResultsState createState() => _SearchResultsState();
}
class _SearchResultsState extends State<SearchResults> {
// var event = RobotProvider();
List<DoctorList> tempList = [];
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
@ -37,23 +42,28 @@ class _SearchResultsState extends State<SearchResults> {
return Container(
height: 12,
margin: EdgeInsets.only(left: 21, right: 21),
// color: Color(0xffD9D9D9),
);
},
itemBuilder: (context, index) {
return AppExpandableNotifier(
title: (widget.patientDoctorAppointmentListHospital[index].distanceInKMs != "0") ? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km : widget.patientDoctorAppointmentListHospital[index].filterName,
title: (widget.patientDoctorAppointmentListHospital[index].distanceInKMs != "0")
? widget.patientDoctorAppointmentListHospital[index].filterName + " - " + widget.patientDoctorAppointmentListHospital[index].distanceInKMs + " " + TranslationBase.of(context).km
: widget.patientDoctorAppointmentListHospital[index].filterName,
isTitleSingleLine: false,
bodyWidget: ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
padding: EdgeInsets.only(bottom: 10, top: 10, left: 21, right: 21),
itemBuilder: (context, _index) {
//widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null;
final doctor = widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index];
return DoctorView(
doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index],
isLiveCareAppointment: widget.isLiveCareAppointment ?? widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].isLiveCare,
);
doctor: doctor,
isLiveCareAppointment: widget.isLiveCareAppointment,
isObGyneAppointment: widget.isObGyneAppointment,
obGyneProcedureListResponse: widget.obGyneProcedureListResponse,
onTap: () {
projectViewModel.analytics.appointment.book_appointment_select_doctor(appointment_type: 'regular', doctor: doctor);
});
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList.length),

@ -1,4 +1,5 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'BookSuccess.dart';
@ -52,8 +54,10 @@ class _BookReminderPageState extends State<BookReminderPage> {
});
}
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
// print("selectedTime "+selectedTime??"");
print("appointmentNo1 " + widget.patientShareResponse.appointmentNo.toString() ?? "");
return AppScaffold(
@ -173,6 +177,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFEAEAEA),
onPressed: () {
projectViewModel.analytics.appointment.appointment_reminder(false);
navigateToBookSuccess(context);
},
child: Text(TranslationBase.of(context).no, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
@ -194,6 +199,7 @@ class _BookReminderPageState extends State<BookReminderPage> {
disabledTextColor: Colors.white,
disabledColor: CustomColors.green,
onPressed: () async {
projectViewModel.analytics.appointment.appointment_reminder(true);
print(widget.patientShareResponse.appointmentNo);
showReminderDialog(
context,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
@ -12,6 +13,7 @@ import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
import '../../../uitl/date_uitl.dart';
@ -112,8 +114,11 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
});
}
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return SingleChildScrollView(
child: Container(
child: Column(
@ -248,6 +253,10 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
elevation: 0,
textColor: new Color(0xFF60686b),
onPressed: () {
final timeslot = dayEvents[index];
DocAvailableAppointments.selectedAppoDateTime = timeslot.end;
projectViewModel.analytics.appointment.book_appointment_time_selection(appointment_type: 'regular', dateTime: timeslot.end, doctor: widget.doctor);
setState(() {
selectedButtonIndex = index;
DocAvailableAppointments.selectedTime = dayEvents[index].isoTime;
@ -284,8 +293,6 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
if (res['FreeTimeSlots'].length != 0) {
DocAvailableAppointments.areAppointmentsAvailable = true;
freeSlotsResponse = res['FreeTimeSlots'];
print("res['FreeTimeSlots']");
print(res['FreeTimeSlots'].length);
_getJSONSlots().then((value) {
setState(() => {

@ -228,6 +228,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
: InkWell(
onTap: () {
showClickListDialog(context, clinicsList, onSelection: (ListClinicCentralized clincs) {
projectViewModel.analytics.appointment.book_appointment_select_clinic(appointment_type: 'regular', clinic: clincs.clinicDescription);
Navigator.pop(context);
setState(() {
dropdownTitle = clincs.clinicDescription;
@ -503,6 +504,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
} else {
isProjectLoaded = false;
}
}).catchError((err) {
}).catchError((err) {
print(err);
});

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -6,6 +7,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../SearchResults.dart';
@ -17,6 +19,7 @@ class SearchByDoctor extends StatefulWidget {
class _SearchByDoctorState extends State<SearchByDoctor> {
TextEditingController doctorNameController = new TextEditingController();
bool _isButtonDisabled;
ProjectViewModel projectViewModel;
@override
void initState() {
@ -26,6 +29,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Column(
children: [
Expanded(
@ -143,6 +147,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
}
_searchDoctor(BuildContext context) {
projectViewModel.analytics.appointment.book_appointment_doctor_search(query: doctorNameController.text);
getDoctorsList(context);
}

@ -93,6 +93,6 @@ class _DentalComplaintCardState extends State<DentalComplaintCard> {
}
Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, isLiveCareAppointment: false)));
}
}

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorProfile.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -18,10 +20,12 @@ import '../DoctorProfile.dart';
class DoctorView extends StatelessWidget {
final DoctorList doctor;
bool isLiveCareAppointment;
bool isObGyneAppointment;
bool isShowFlag;
OBGyneProcedureListResponse obGyneProcedureListResponse;
final VoidCallback onTap;
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isShowFlag = true, this.onTap});
DoctorView({@required this.doctor, @required this.isLiveCareAppointment, this.isObGyneAppointment = false, this.isShowFlag = true, this.onTap, this.obGyneProcedureListResponse});
ProjectViewModel projectViewModel;
@ -29,10 +33,14 @@ class DoctorView extends StatelessWidget {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return InkWell(
onTap: onTap ??
() {
if (isShowFlag) getDoctorsProfile(context, doctor, isAppo: true);
},
onTap: () {
if (isObGyneAppointment) {
next(context);
} else {
if (isShowFlag) getDoctorsProfile(context, doctor, isAppo: true);
(onTap ?? () {})(); // For log analytics of doctor click from book appointment
}
},
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
@ -85,7 +93,7 @@ class DoctorView extends StatelessWidget {
children: <Widget>[
if (doctor.clinicName != null) MyRichText(TranslationBase.of(context).clinic + ":", doctor.clinicName, projectViewModel.isArabic),
if (doctor.projectName != null) MyRichText(TranslationBase.of(context).branch, doctor.projectName, projectViewModel.isArabic),
if (doctor.speciality != null)
if (doctor.speciality != null && doctor.speciality.length > 0)
Text(
this.doctor.speciality[0].trim(),
// getDoctorSpeciality(this.doctor.speciality).trim(),
@ -184,6 +192,10 @@ class DoctorView extends StatelessWidget {
}
}
void next(BuildContext context) {
Navigator.push(context, FadePage(page: ObGyneTimeSlots(projectID: doctor.projectID, selectedClinicID: doctor.clinicID, selectedDoctorID: doctor.doctorID, obGyneProcedureListResponse: obGyneProcedureListResponse)));
}
Future navigateToDoctorProfile(context, docObject, docProfile, {isAppo}) async {
Navigator.push(
context,

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/CalendarUtils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -41,23 +43,30 @@ Future<void> _showReminderDialog(BuildContext context, DateTime dateTime, String
insetPadding: EdgeInsets.all(21),
child: ReminderDialog(
onClick: (int i) async {
String text = "";
if (i == 0) {
// Before 30 mints
dateTime = Jiffy(dateTime).subtract(minutes: 30).dateTime;
text = "30 minutes";
// dateTime.add(new Duration(minutes: -30));
} else if (i == 1) {
// Before 1 hour
// dateTime.add(new Duration(minutes: -60));
dateTime = Jiffy(dateTime).subtract(hours: 1).dateTime;
text = "1 hours";
} else if (i == 2) {
// Before 1 hour and 30 mints
// dateTime.add(new Duration(minutes: -90));
dateTime = Jiffy(dateTime).subtract(hours: 1, minutes: 30).dateTime;
text = "1 hours 30 minutes";
} else if (i == 3) {
// Before 2 hours
// dateTime.add(new Duration(minutes: -120));
dateTime = Jiffy(dateTime).subtract(hours: 2).dateTime;
text = "2 hours";
}
locator<GAnalytics>().appointment.appointment_reminder_time(reminde_before: text);
if (onMultiDateSuccess == null) {
CalendarUtils calendarUtils = await CalendarUtils.getInstance();
calendarUtils

@ -551,6 +551,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
service.confirmAppointment(widget.appo.appointmentNo, widget.appo.clinicID, widget.appo.projectID, widget.appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.appointment.appointment_details_confirm(appointment: widget.appo);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
Navigator.of(context).pop();
} else {
@ -567,6 +568,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(widget.appo, context).then((res) {
projectViewModel.analytics.appointment.appointment_details_cancel(appointment: widget.appo);
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
getToDoCount();

@ -97,6 +97,8 @@ class _SchedulePageState extends State<SchedulePage> {
itemCount: weeks[index].length,
itemBuilder: (context, index2) => InkWell(
onTap: () {
final weekDay = weeks[index][index2]['DayName'];
projectViewModel.analytics.appointment.book_appointment_date_selection(appointment_type: 'regular', day: weekDay, doctor: doctorList);
openBookAppointment(weeks[index][index2]);
},
child: Row(

@ -0,0 +1,543 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
import 'package:provider/provider.dart';
import 'package:syncfusion_flutter_calendar/calendar.dart';
class ObGyneTimeSlots extends StatefulWidget {
int projectID;
static bool areSlotsAvailable = false;
static DateTime selectedAppoDateTime;
static String selectedDate;
static String selectedTime;
int selectedClinicID;
int selectedDoctorID;
OBGyneProcedureListResponse obGyneProcedureListResponse;
var language;
ObGyneTimeSlots({@required this.projectID, this.selectedClinicID, this.selectedDoctorID, this.obGyneProcedureListResponse});
@override
_CovidTimeSlotsState createState() => _CovidTimeSlotsState();
}
class _CovidTimeSlotsState extends State<ObGyneTimeSlots> with TickerProviderStateMixin {
Map<DateTime, List> _events;
AnimationController _animationController;
CalendarController _calendarController;
AppSharedPreferences sharedPref = new AppSharedPreferences();
var selectedDate = "";
dynamic selectedDateJSON;
dynamic jsonFreeSlots;
List<TimeSlot> docFreeSlots = [];
List<TimeSlot> dayEvents = [];
int selectedButtonIndex = 0;
dynamic freeSlotsResponse;
ScrollController _scrollController;
ToDoCountProviderModel toDoProvider;
ProjectViewModel projectViewModel;
@override
void initState() {
final _selectedDay = DateTime.now();
_scrollController = new ScrollController();
_events = {
_selectedDay: ['Event A0']
};
WidgetsBinding.instance.addPostFrameCallback((_) => getCovidFreeSlots(context, widget.projectID));
_calendarController = CalendarController();
_animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 50),
);
_animationController.forward();
super.initState();
}
@override
void dispose() {
_animationController.dispose();
_calendarController.dispose();
super.dispose();
}
void _onDaySelected(DateTime day, ProjectViewModel projectViewModel) {
final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() {
this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots);
ObGyneTimeSlots.selectedDate = formatter.format(day);
_calendarController.selectedDate = day;
print(ObGyneTimeSlots.selectedDate);
});
}
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).bookAppo,
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Text(
TranslationBase.of(context).selectAppo,
style: TextStyle(
color: Colors.black,
fontSize: 16.0,
letterSpacing: -0.64,
fontWeight: FontWeight.w600,
),
),
mHeight(12),
Container(
decoration: cardRadius(12),
child: _buildTableCalendarWithBuilders(projectViewModel),
),
mHeight(12),
Text(
selectedDate,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
letterSpacing: -0.64,
),
),
mHeight(8),
ObGyneTimeSlots.areSlotsAvailable
? Container(
height: 40,
child: ListView.builder(
controller: _scrollController,
scrollDirection: Axis.horizontal,
itemCount: dayEvents.length,
itemBuilder: (context, index) {
return Container(
margin: EdgeInsets.only(right: (index == dayEvents.length - 1) ? 0 : 5.0, left: index == 0 ? 0 : 5),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(5.0),
side: BorderSide(
color: index == selectedButtonIndex ? CustomColors.green : Colors.black, //Color of the border
style: BorderStyle.solid, //Style of the border
width: 1.5, //width of the border
),
),
minWidth: MediaQuery.of(context).size.width * 0.2,
child: index == selectedButtonIndex ? getSelectedButton(index) : getNormalButton(index)),
);
},
),
)
: Center(
child: Padding(
padding: const EdgeInsets.only(left: 12.0, right: 12.0),
child: Text(TranslationBase.of(context).noSlotsError, style: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.grey)),
)),
],
),
),
SizedBox(
height: 100.0,
),
],
),
),
),
),
Container(
margin: EdgeInsets.zero,
decoration: cardRadius(0),
child: Container(
width: double.infinity,
padding: EdgeInsets.all(12),
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: CustomColors.green,
textColor: Colors.white,
disabledTextColor: Colors.white,
elevation: 0,
disabledColor: Colors.grey[500],
onPressed: () {
bookCovidTestAppointment();
},
child: Text(
TranslationBase.of(context).bookAppo,
style: TextStyle(
fontSize: 16.0,
letterSpacing: -0.64,
),
),
),
),
),
)
],
),
);
}
Widget _buildTableCalendarWithBuilders(ProjectViewModel projectViewModel) {
return SfCalendar(
controller: _calendarController,
minDate: DateTime.now(),
showNavigationArrow: true,
headerStyle: CalendarHeaderStyle(textAlign: TextAlign.center, textStyle: TextStyle(fontSize: 14.0, fontWeight: FontWeight.w600, letterSpacing: -0.46)),
viewHeaderStyle: ViewHeaderStyle(dayTextStyle: TextStyle(fontSize: 12.0, fontWeight: FontWeight.w600, letterSpacing: -0.46, color: CustomColors.black)),
view: CalendarView.month,
todayHighlightColor: CustomColors.green,
selectionDecoration: containerColorRadiusBorderWidthCircular(Colors.transparent, 4, CustomColors.green, 2.5),
cellBorderColor: Colors.white,
dataSource: MeetingDataSource(_getDataSource()),
monthViewSettings: const MonthViewSettings(appointmentDisplayMode: MonthAppointmentDisplayMode.indicator, showTrailingAndLeadingDates: false, appointmentDisplayCount: 1),
onTap: (CalendarTapDetails details) {
_calendarController.selectedDate = details.date;
_onDaySelected(details.date, projectViewModel);
},
);
}
List<Meeting> _getDataSource() {
final List<Meeting> meetings = <Meeting>[];
_events.forEach((key, value) {
final DateTime startTime = DateTime(key.year, key.month, key.day, 9, 0, 0);
final DateTime endTime = startTime.add(const Duration(minutes: 20));
meetings.add(Meeting("", startTime, endTime, CustomColors.green, false));
});
return meetings;
}
openTimeSlotsPickerForDate(DateTime dateStart, List<TimeSlot> freeSlots) {
dayEvents.clear();
DateTime dateStartObj = new DateTime(dateStart.year, dateStart.month, dateStart.day, 0, 0, 0, 0, 0);
freeSlots.forEach((v) {
if (v.start == dateStartObj) dayEvents.add(v);
});
setState(() {
if (dayEvents.length != 0) {
ObGyneTimeSlots.areSlotsAvailable = true;
selectedButtonIndex = 0;
ObGyneTimeSlots.selectedTime = dayEvents[selectedButtonIndex].isoTime;
} else
ObGyneTimeSlots.areSlotsAvailable = false;
});
}
Future<Map<DateTime, List>> _getJSONSlots() async {
Map<DateTime, List> _eventsParsed;
List<FreeSlot> slotsList = [];
DateTime date;
final DateFormat formatter = DateFormat('HH:mm');
final DateFormat dateFormatter = DateFormat('yyyy-MM-dd');
for (var i = 0; i < freeSlotsResponse.length; i++) {
date = DateUtil.convertStringToDate(freeSlotsResponse[i]);
slotsList.add(FreeSlot(date, ['slot']));
docFreeSlots.add(TimeSlot(isoTime: formatter.format(date), start: new DateTime(date.year, date.month, date.day, 0, 0, 0, 0), end: date));
}
_eventsParsed = Map.fromIterable(slotsList, key: (e) => e.slot, value: (e) => e.event);
setState(() {
ObGyneTimeSlots.selectedDate = dateFormatter.format(DateUtil.convertStringToDate(freeSlotsResponse[0]));
selectedDate = DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(freeSlotsResponse[0]));
selectedDateJSON = freeSlotsResponse[0];
});
openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots);
_calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON);
return _eventsParsed;
}
Widget getNormalButton(int index) {
return RaisedButton(
color: Colors.white,
elevation: 0,
textColor: new Color(0xFF60686b),
onPressed: () {
setState(() {
selectedButtonIndex = index;
ObGyneTimeSlots.selectedTime = dayEvents[index].isoTime;
print(ObGyneTimeSlots.selectedTime);
});
},
child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)),
);
}
Widget getSelectedButton(int index) {
return RaisedButton(
color: CustomColors.green,
//Color of the border
elevation: 0,
textColor: Colors.white,
onPressed: () {
setState(() {
selectedButtonIndex = index;
ObGyneTimeSlots.selectedTime = dayEvents[index].isoTime;
print(ObGyneTimeSlots.selectedTime);
});
},
child: Text(dayEvents[index].isoTime, style: TextStyle(fontSize: 12.0, fontWeight: FontWeight.bold)),
);
}
bookCovidTestAppointment() {
if (ObGyneTimeSlots.areSlotsAvailable) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorList docObject = new DoctorList();
docObject.doctorID = widget.selectedDoctorID;
docObject.clinicID = widget.selectedClinicID;
docObject.projectID = widget.projectID;
insertAppointmentCovidTest(context, docObject);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).selectSlot);
}
}
// updateCovidQuestionnaire(context, String appoNo) async {
// DoctorsListService service = new DoctorsListService();
// service.updateCovidQuestionnaire(appoNo, widget.projectID, widget.selectedProject.testTypeEnum, widget.selectedProject.testProcedureEnum).then((res) {}).catchError((err) {
// print(err);
// });
// }
insertAppointmentCovidTest(context, DoctorList docObject) {
DoctorsListService service = new DoctorsListService();
AppoitmentAllHistoryResultList appo;
service
.insertAppointment(
docObject.doctorID, docObject.clinicID, docObject.projectID, ObGyneTimeSlots.selectedTime, ObGyneTimeSlots.selectedDate, context, widget.obGyneProcedureListResponse.procedureId)
.then((res) {
if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: TranslationBase.of(context).bookedSuccess);
updateObGyneAppointment(res['AppointmentNo']);
getToDoCount();
// getPatientShare(context, res['AppointmentNo'], docObject.clinicID, docObject.projectID, docObject);
} else {
GifLoaderDialogUtils.hideDialog(context);
appo = new AppoitmentAllHistoryResultList();
appo.appointmentNo = res['SameClinicApptList'][0]['AppointmentNo'];
appo.clinicID = res['SameClinicApptList'][0]['DoctorID'];
appo.projectID = res['SameClinicApptList'][0]['ProjectID'];
appo.endTime = res['SameClinicApptList'][0]['EndTime'];
appo.startTime = res['SameClinicApptList'][0]['StartTime'];
appo.doctorID = res['SameClinicApptList'][0]['DoctorID'];
appo.isLiveCareAppointment = false;
appo.originalClinicID = 0;
appo.originalProjectID = 0;
appo.appointmentDate = res['SameClinicApptList'][0]['AppointmentDate'];
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: res['ErrorEndUserMessage'],
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {cancelAppointment(docObject, appo, context)},
cancelFunction: () => {});
dialog.showAlertDialog(context);
}
}).catchError((err) {
AppToast.showErrorToast(message: err);
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
updateObGyneAppointment(String appoNo) {
DoctorsListService service = new DoctorsListService();
service
.updateObGyneAppointment(widget.obGyneProcedureListResponse.episodeID, int.parse(appoNo), widget.obGyneProcedureListResponse.orderNo, widget.obGyneProcedureListResponse.procedureId,
widget.obGyneProcedureListResponse.lineItemNo, widget.obGyneProcedureListResponse.uniqueRowID)
.then((res) {})
.catchError((err) {
print(err);
});
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
cancelAppointment(DoctorList docObject, AppoitmentAllHistoryResultList appo, BuildContext context) {
ConfirmDialog.closeAlertDialog(context);
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.cancelAppointment(appo, context).then((res) {
if (res['MessageStatus'] == 1) {
// Future.delayed(new Duration(milliseconds: 1500), () {
insertAppointmentCovidTest(context, docObject);
// });
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
print(err);
});
}
// getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
// DoctorsListService service = new DoctorsListService();
// service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
// GifLoaderDialogUtils.hideDialog(context);
// print(res);
// widget.patientShareResponse = new PatientShareResponse.fromJson(res);
// // updateCovidQuestionnaire(context, appointmentNo);
// navigateToPaymentAlert();
// }).catchError((err) {
// GifLoaderDialogUtils.hideDialog(context);
// print(err);
// });
// }
//
// navigateToPaymentAlert() {
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentAlert(patientShareResponse: widget.patientShareResponse),
// ),
// );
// }
getCovidFreeSlots(BuildContext context, int projectID) {
DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context);
service.getDoctorFreeSlots(widget.selectedDoctorID, widget.selectedClinicID, widget.projectID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['FreeTimeSlots'].length != 0) {
print(res['FreeTimeSlots']);
freeSlotsResponse = res['FreeTimeSlots'];
_getJSONSlots().then((value) => {
setState(() => {
_events.clear(),
_events = value,
// if (widget.doctorSchedule != null)
// {_onDaySelected(DateUtil.convertStringToDate(widget.doctorSchedule['Date'])), _calendarController.selectedDate = DateUtil.convertStringToDate(widget.doctorSchedule['Date'])}
})
});
} else {}
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err.toString());
print(err);
});
}
}
class MeetingDataSource extends CalendarDataSource {
MeetingDataSource(List<Meeting> source) {
appointments = source;
}
@override
DateTime getStartTime(int index) {
return _getMeetingData(index).from;
}
@override
DateTime getEndTime(int index) {
return _getMeetingData(index).to;
}
@override
String getSubject(int index) {
return _getMeetingData(index).eventName;
}
@override
Color getColor(int index) {
return _getMeetingData(index).background;
}
@override
bool isAllDay(int index) {
return _getMeetingData(index).isAllDay;
}
Meeting _getMeetingData(int index) {
final dynamic meeting = appointments[index];
Meeting meetingData;
if (meeting is Meeting) {
meetingData = meeting;
}
return meetingData;
}
}
class Meeting {
Meeting(this.eventName, this.from, this.to, this.background, this.isAllDay);
String eventName;
DateTime from;
DateTime to;
Color background;
bool isAllDay;
}

@ -2,10 +2,13 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/OBGyneProcedureListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/QRCode.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/SearchResults.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/widgets/paymentDialog.dart';
@ -35,6 +38,7 @@ import 'package:rating_bar/rating_bar.dart';
class ToDo extends StatefulWidget {
PatientShareResponse patientShareResponse;
List<AppoitmentAllHistoryResultList> appoList = [];
List<OBGyneProcedureListResponse> obGyneAppoList = [];
var languageID;
MyInAppBrowser browser;
@ -47,7 +51,7 @@ class ToDo extends StatefulWidget {
_ToDoState createState() => _ToDoState();
}
class _ToDoState extends State<ToDo> {
class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
AppSharedPreferences sharedPref = AppSharedPreferences();
List<ImagesInfo> imagesInfo = List();
@ -55,10 +59,12 @@ class _ToDoState extends State<ToDo> {
CountdownTimerController controller;
ProjectViewModel projectViewModel;
TabController _tabController;
@override
void initState() {
widget.patientShareResponse = new PatientShareResponse();
_tabController = TabController(length: 2, vsync: this);
WidgetsBinding.instance.addPostFrameCallback((_) {
getPatientAppointmentHistory();
});
@ -69,6 +75,12 @@ class _ToDoState extends State<ToDo> {
controller = CountdownTimerController(endTime: endTime);
}
@override
void dispose() {
super.dispose();
_tabController.dispose();
}
@override
Widget build(BuildContext context) {
toDoProvider = Provider.of<ToDoCountProviderModel>(context);
@ -84,173 +96,305 @@ class _ToDoState extends State<ToDo> {
description: TranslationBase.of(context).infoTodo,
onTap: widget.onBackClick,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: SingleChildScrollView(
child: Column(
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: widget.appoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
body: Column(
children: <Widget>[
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).appointments), Text(TranslationBase.of(context).orders)],
onTap: (index) {
if (index == 1) {
getOBGyneOrdersList();
}
},
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: widget.appoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Padding(
padding: const EdgeInsets.only(top: 4.0),
child: widget.appoList[index].clinicID == 265
? Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset("assets/images/new/virtual.svg")
: SvgPicture.asset("assets/images/new/hospital-visit.svg"),
// SvgPicture.asset("assets/images/new/virtual.svg"),
),
Column(
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
widget.appoList[index].clinicID == 265
? TranslationBase.of(context).covidTestTodo
: widget.appoList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
padding: const EdgeInsets.only(top: 4.0),
child: widget.appoList[index].clinicID == 265
? Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
)
: widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset("assets/images/new/virtual.svg")
: SvgPicture.asset("assets/images/new/hospital-visit.svg"),
// SvgPicture.asset("assets/images/new/virtual.svg"),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: CountdownTimer(
controller: new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
widgetBuilder: (_, CurrentRemainingTime time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(
widget.appoList[index].clinicID == 265
? TranslationBase.of(context).covidTestTodo
: widget.appoList[index].isLiveCareAppointment
? TranslationBase.of(context).liveCareAppo
: TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: CountdownTimer(
controller: new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
widgetBuilder: (_, CurrentRemainingTime time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
),
),
],
),
],
),
Container(
child: InkWell(
onTap: () {
performNextAction(widget.appoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: getNextActionButtonColor(widget.appoList[index].nextAction),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
getNextActionText(widget.appoList[index].nextAction),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
),
),
],
),
Container(
child: InkWell(
onTap: () {
performNextAction(widget.appoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: getNextActionButtonColor(widget.appoList[index].nextAction),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
getNextActionText(widget.appoList[index].nextAction),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
url: widget.appoList[index].doctorImageURL,
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", widget.appoList[index].clinicName, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, widget.appoList[index].projectName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
RatingBar.readOnly(
initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
size: 16.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
],
),
],
),
),
],
),
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: Text(
getNextActionDescription(widget.appoList[index].nextAction),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16),
),
),
InkWell(
onTap: () {
navigateToAppointmentDetails(context, widget.appoList[index]);
},
child: Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(
fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline),
),
),
),
],
),
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: widget.appoList[index].doctorTitle + " " + widget.appoList[index].doctorNameObj,
url: widget.appoList[index].doctorImageURL,
width: 52,
height: 52,
);
},
),
),
Container(
child: ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
itemCount: widget.obGyneAppoList.length,
itemBuilder: (context, index) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(left: 12.0, right: 12.0, top: 12.0),
decoration: cardRadius(12),
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Container(
margin: EdgeInsets.only(left: 5.0, right: 5.0),
child: SvgPicture.asset("assets/images/new/ultrasound.svg", width: 20.0, height: 20.0),
),
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: Text(TranslationBase.of(context).walkinAppo,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
),
],
),
],
),
Container(
child: InkWell(
onTap: () {
getOBGyneDoctorsList(widget.obGyneAppoList[index].projectID, widget.obGyneAppoList[index].setupID, widget.obGyneAppoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: CustomColors.green,
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
TranslationBase.of(context).bookNow,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
),
),
),
],
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
MyRichText(TranslationBase.of(context).clinic + ": ", widget.appoList[index].clinicName, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).appointmentDate + ": ",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(widget.appoList[index].appointmentDate)), projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, widget.appoList[index].projectName, projectViewModel.isArabic),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: Text(
TranslationBase.of(context).dr + " " + widget.obGyneAppoList[index].doctorName,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: TranslationBase.of(context).dr + " " + widget.obGyneAppoList[index].doctorName,
url: "https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
width: 52,
height: 52,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
RatingBar.readOnly(
initialRating: widget.appoList[index].actualDoctorRate.toDouble(),
size: 16.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
MyRichText(TranslationBase.of(context).clinic + ": ", widget.obGyneAppoList[index].clinicDescription, projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).orderDate + ": ",
DateUtil.getDayMonthYearHourMinuteDateFormatted(DateUtil.convertStringToDate(widget.obGyneAppoList[index].orderDate)).split(" ")[0], projectViewModel.isArabic),
MyRichText(TranslationBase.of(context).branch, widget.obGyneAppoList[index].projectDescription, projectViewModel.isArabic),
],
),
],
),
),
],
),
],
),
Padding(
padding: const EdgeInsets.only(top: 12.0),
child: Text(
getNextActionDescription(widget.appoList[index].nextAction),
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 25 / 16),
),
),
InkWell(
onTap: () {
navigateToAppointmentDetails(context, widget.appoList[index]);
},
child: Padding(
padding: const EdgeInsets.only(top: 0.0),
child: Text(
TranslationBase.of(context).moreDetails,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48, height: 25 / 16, decoration: TextDecoration.underline),
),
),
),
],
),
);
},
),
),
SizedBox(
height: 120.0,
);
},
),
),
],
),
],
),
),
SizedBox(
height: 120.0,
),
],
),
);
}
@ -484,11 +628,81 @@ class _ToDoState extends State<ToDo> {
}
Future navigateToAppointmentDetails(context, AppoitmentAllHistoryResultList appo) async {
projectViewModel.analytics.todoList.to_do_list_more_details(appo);
Navigator.push(context, FadePage(page: AppointmentDetails(appo: appo, parentIndex: appo.patientStatusType == 42 ? 1 : 0))).then((value) {
getPatientAppointmentHistory();
});
}
getOBGyneOrdersList() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getOBGyneOrdersList(context).then((res) {
widget.obGyneAppoList.clear();
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['HIS_OBGYNEProcedureGet_List'].length != 0) {
widget.obGyneAppoList.clear();
res['HIS_OBGYNEProcedureGet_List'].forEach((v) {
widget.obGyneAppoList.add(new OBGyneProcedureListResponse.fromJson(v));
});
} else {
// Navigator.of(context).popAndPushNamed(HOME);
}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
getOBGyneDoctorsList(int projectID, String setupID, OBGyneProcedureListResponse obGyneProcedureListResponse) {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
List<DoctorList> doctorsList = [];
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = [];
service.getOBGyneDoctorsList(projectID, setupID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['HIS_ObgyneUltrasoundDoctorsList'][0]);
if (res['MessageStatus'] == 1) {
setState(() {
if (res['HIS_ObgyneUltrasoundDoctorsList'].length != 0) {
res['HIS_ObgyneUltrasoundDoctorsList'].forEach((v) {
doctorsList.add(new DoctorList.fromJson(v));
});
print(doctorsList.length);
doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital.where((elementClinic) => elementClinic.filterName == element.projectName).toList();
if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
} else {
_patientDoctorAppointmentListHospital
.add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
}
});
navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital, obGyneProcedureListResponse);
} else {
// Navigator.of(context).popAndPushNamed(HOME);
}
});
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital, OBGyneProcedureListResponse obGyneProcedureListResponse) {
Navigator.push(context, FadePage(page: SearchResults(isLiveCareAppointment: false, isObGyneAppointment: true, doctorsList: docList, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital, obGyneProcedureListResponse: obGyneProcedureListResponse)));
}
getPatientAppointmentHistory() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
@ -503,7 +717,7 @@ class _ToDoState extends State<ToDo> {
widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
} else {
Navigator.of(context).popAndPushNamed(HOME);
// Navigator.of(context).popAndPushNamed(HOME);
}
});
} else {
@ -563,26 +777,22 @@ class _ToDoState extends State<ToDo> {
DoctorsListService service = new DoctorsListService();
service.generateAppointmentQR(patientShareResponse, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
navigateToQR(context, res['AppointmentQR'], patientShareResponse);
projectViewModel.analytics.todoList.to_do_list_check_in(appo);
navigateToQR(context, res['AppointmentQR'], patientShareResponse, appo);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse) async {
Navigator.push(
context,
FadePage(
page: QRCode(
patientShareResponse: patientShareResponse,
appoQR: appoQR,
))).then((value) {
Future navigateToQR(context, String appoQR, PatientShareResponse patientShareResponse, AppoitmentAllHistoryResultList appintment) async {
Navigator.push(context, FadePage(page: QRCode(patientShareResponse: patientShareResponse, appoQR: appoQR, appointment: appintment))).then((value) {
getPatientAppointmentHistory();
});
}
openPaymentDialog(AppoitmentAllHistoryResultList appo, PatientShareResponse patientShareResponse) {
projectViewModel.analytics.todoList.to_do_list_pay_now(appo);
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
@ -601,9 +811,11 @@ class _ToDoState extends State<ToDo> {
context: context,
pageBuilder: (context, animation1, animation2) {})
.then((value) {
if (value != null) {
projectViewModel.analytics.todoList.to_do_list_confirm_payment_details(appo);
navigateToPaymentMethod(context, value, appo);
} else {
projectViewModel.analytics.todoList.to_do_list_cancel_payment_details(appo);
}
});
}
@ -734,6 +946,7 @@ class _ToDoState extends State<ToDo> {
service.confirmAppointment(appo.appointmentNo, appo.clinicID, appo.projectID, appo.isLiveCareAppointment, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
projectViewModel.analytics.todoList.to_do_list_confirm_appointment(appo);
AppToast.showSuccessToast(message: res['ErrorEndUserMessage']);
if (appo.isLiveCareAppointment) {
insertLiveCareVIDARequest(appo);

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';

@ -102,6 +102,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: SliderView(
onLoginClick: () {
widget.onLoginClick();
projectViewModel.analytics.loginRegistration.login_register_initiate();
// navigateTo(context, CallHomePage());
},
),
@ -566,10 +567,6 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
);
}
callPayfortApplePayAPI(ApplePayResponse applePayResponse) {
}
Widget showFloating(String icon) {
return Container(
width: MediaQuery.of(context).size.width * 0.06,

@ -18,6 +18,7 @@ import 'package:diplomaticquarterapp/pages/landing/home_page_2.dart';
import 'package:diplomaticquarterapp/pages/livecare/incoming_call.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page_new.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart' as family;
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -135,6 +136,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/family-file/ar/1.png'),
);
projectViewModel.analytics.bottomTabNavigation.logNavName('my family');
Navigator.push(
context,
MaterialPageRoute(
@ -154,6 +157,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/todo/ar/0.png'));
projectViewModel.analytics.bottomTabNavigation.logNavName('todo list');
Navigator.push(
context,
MaterialPageRoute(
@ -174,6 +178,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (tab == 5) {
IS_VOICE_COMMAND_CLOSED = false;
triggerRobot();
projectViewModel.analytics.bottomTabNavigation.logNavName('help robot');
// pageController.jumpToPage(tab);
} else {
@ -197,6 +202,21 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
});
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) {
super.didChangeAppLifecycleState(state);
@ -234,10 +254,10 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
});
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
//for now commented to reduce this call will enable it when needed
HMGNetworkConnectivity(context, () {
GifLoaderDialogUtils.showMyDialog(context);
PlatformBridge.shared().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)});
}).checkAndConnectIfNoInternet();
// HMGNetworkConnectivity(context, () {
// GifLoaderDialogUtils.showMyDialog(context);
// PlatformBridge.shared().connectHMGGuestWifi().then((value) => {GifLoaderDialogUtils.hideDialog(context)});
// }).checkAndConnectIfNoInternet();
requestPermissions().then((results) {
locationUtils.getCurrentLocation();
@ -463,6 +483,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
PageView(
physics: NeverScrollableScrollPhysics(),
controller: pageController,
onPageChanged: (idx){
projectViewModel.analytics.bottomTabNavigation.logNavName('');
},
children: [
HomePage2(
goToMyProfile: () {
@ -472,6 +495,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
login();
},
onMedicalFileClick: () {
projectViewModel.analytics.bottomTabNavigation.logNavName('medical file');
changeCurrentTab(1);
},
),
@ -510,6 +534,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
? FloatingButton(
elevation: true,
onTap: () {
projectViewModel.analytics.appointment.book_appointment();
changeCurrentTab(2);
},
)

@ -1,4 +1,5 @@
import 'package:auto_size_text/auto_size_text.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -52,26 +53,36 @@ class ServicesView extends StatelessWidget {
return InkWell(
onTap: () {
if (index == 0) {
locator<GAnalytics>().hmgServices.logServiceName('live care service');
Navigator.push(context, FadePage(page: LiveCareHome())).then((value) {
LiveCareHome.isLiveCareTypeSelected = false;
});
} else if (index == 1) {
locator<GAnalytics>().hmgServices.logServiceName('covid-test drive-thru');
Navigator.push(context, FadePage(page: CovidDrivethruLocation()));
} else if (index == 2) {
locator<GAnalytics>().hmgServices.logServiceName('online payments');
Navigator.push(context, FadePage(page: PaymentService()));
} else if (index == 3) {
locator<GAnalytics>().hmgServices.logServiceName('home health care');
Navigator.push(context, FadePage(page: HomeHealthCarePage()));
} else if (index == 4) {
locator<GAnalytics>().hmgServices.logServiceName('comprehensive medical checkup');
Navigator.push(context, FadePage(page: CMCPage()));
} else if (index == 5) {
locator<GAnalytics>().hmgServices.logServiceName('emergency service');
Navigator.push(context, FadePage(page: ErOptions(isAppbar: true)));
} else if (index == 6) {
locator<GAnalytics>().hmgServices.logServiceName('e-referral service');
Navigator.push(context, FadePage(page: EReferralPage()));
} else if (index == 7) {
locator<GAnalytics>().hmgServices.logServiceName('water consumption');
Navigator.push(context, FadePage(page: H2OPage()));
} else if (index == 8) {
locator<GAnalytics>().hmgServices.logServiceName('find us reach us');
Navigator.push(context, FadePage(page: ContactUsPage()));
} else if (index == 9) {
locator<GAnalytics>().hmgServices.logServiceName('my medical details');
Navigator.push(
context,
FadePage(
@ -79,6 +90,7 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 10) {
locator<GAnalytics>().hmgServices.logServiceName('book appointment');
Navigator.push(
context,
FadePage(
@ -86,8 +98,10 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 11) {
locator<GAnalytics>().hmgServices.logServiceName('al habib pharmacy');
getPharmacyToken(context);
} else if (index == 12) {
locator<GAnalytics>().hmgServices.logServiceName('update insurance');
Navigator.push(
context,
FadePage(
@ -95,6 +109,7 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 13) {
locator<GAnalytics>().hmgServices.logServiceName('my family files');
Navigator.push(
context,
FadePage(
@ -102,19 +117,23 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 14) {
locator<GAnalytics>().hmgServices.logServiceName('my child vaccines');
Navigator.push(
context,
FadePage(page: ChildInitialPage()),
);
} else if (index == 15) {
// Navigator.pop(context);
locator<GAnalytics>().hmgServices.logServiceName('todo list');
LandingPage.shared.switchToDoFromHMGServices();
} else if (index == 16) {
locator<GAnalytics>().hmgServices.logServiceName('blood donation');
Navigator.push(
context,
FadePage(page: BloodDonationPage()),
);
} else if (index == 17) {
locator<GAnalytics>().hmgServices.logServiceName('health calculator');
Navigator.push(
context,
FadePage(
@ -122,6 +141,7 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 18) {
locator<GAnalytics>().hmgServices.logServiceName('heath converters');
Navigator.push(
context,
FadePage(
@ -129,11 +149,13 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 19) {
locator<GAnalytics>().hmgServices.logServiceName('smart watches');
Navigator.push(
context,
FadePage(page: SmartWatchInstructions()),
);
} else if (index == 20) {
locator<GAnalytics>().hmgServices.logServiceName('car parcking service');
Navigator.push(
context,
FadePage(
@ -141,8 +163,10 @@ class ServicesView extends StatelessWidget {
),
);
} else if (index == 21) {
locator<GAnalytics>().hmgServices.logServiceName('virtual tour');
launch("https://hmgwebservices.com/vt_mobile/html/index.html");
} else if (index == 22) {
locator<GAnalytics>().hmgServices.logServiceName('latest news');
Navigator.of(context).push(MaterialPageRoute(
builder: (BuildContext context) => MyWebView(
title: "HMG News",

@ -279,6 +279,7 @@ class _LiveCarePatmentPageState extends State<LiveCarePatmentPage> {
if (_selected == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
} else {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_TnC(clinic: widget.clinicName);
Navigator.pop(context, true);
}
},

@ -1,10 +1,12 @@
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:provider/provider.dart';
class LiveCareTypeSelect extends StatefulWidget {
@override
@ -15,6 +17,8 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
var languageID;
AppSharedPreferences sharedPref = AppSharedPreferences();
ProjectViewModel projectViewModel;
@override
void initState() {
getLanguageID();
@ -23,6 +27,7 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of<ProjectViewModel>(context);
return AppScaffold(
isShowDecPage: true,
isShowAppBar: true,
@ -109,8 +114,10 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
return InkWell(
onTap: () {
if (_loginIndex == 1) {
projectViewModel.analytics.liveCare.livecare_immediate_consultation();
Navigator.pop(context, "immediate");
} else {
projectViewModel.analytics.liveCare.livecare_schedule_video_call();
Navigator.pop(context, "schedule");
}
},

@ -1,4 +1,6 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ClinicsServiceTimingsResponse.dart';
import 'package:diplomaticquarterapp/models/LiveCare/LiveCareClinicsListResponse.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
@ -21,7 +23,9 @@ class ClinicCard extends StatefulWidget {
var languageID;
int isOnline;
ClinicCard({this.isSelected, this.languageID, this.isOnline, @required this.patientERGetClinicsList});
ClinicCard({this.isSelected, this.languageID, this.isOnline, @required this.patientERGetClinicsList}){
}
@override
_State createState() => _State();
@ -126,7 +130,7 @@ class _State extends State<ClinicCard> {
),
),
InkWell(
onTap: (){ getClinicTimings(widget.patientERGetClinicsList);},
onTap: () => getClinicTimings(widget.patientERGetClinicsList),
child: Container(
padding: EdgeInsets.only(left: 8,right: 8,top: 4,bottom: 4),
decoration: containerRadius(CustomColors.devider, 100),
@ -159,6 +163,9 @@ class _State extends State<ClinicCard> {
}
getClinicTimings(PatientERGetClinicsList patientERGetClinicsList) {
locator<GAnalytics>().liveCare.livecare_clinic_schedule(clinic: patientERGetClinicsList.serviceName);
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
service.getLivecareClinicTiming(patientERGetClinicsList.serviceID, context).then((res) {

@ -1,6 +1,7 @@
import 'dart:io';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -32,6 +33,7 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import '../live_care_payment_page.dart';
@ -69,6 +71,8 @@ class _clinic_listState extends State<ClinicList> {
String liveCareClinicIDs;
ProjectViewModel projectViewModel;
@override
void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse();
@ -95,12 +99,15 @@ class _clinic_listState extends State<ClinicList> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return Container(
child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList(),
);
}
void startLiveCare() {
projectViewModel.analytics.liveCare.livecare_immediate_consultation_clinic(clinic: selectedClinicName);
bool isError = false;
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);
@ -277,6 +284,7 @@ class _clinic_listState extends State<ClinicList> {
}))).then((value) {
print(value);
if (value != null) {
projectViewModel.analytics.liveCare.payment_method(appointment_type: 'livecare', clinic: selectedClinicName, payment_method: value, payment_type: 'appointment');
openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
}
});
@ -588,6 +596,8 @@ class _clinic_listState extends State<ClinicList> {
}
void startScheduleLiveCare() {
projectViewModel.analytics.liveCare.livecare_schedule_video_call_clinic(clinic: selectedClinicName);
List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context);

@ -1,3 +1,7 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -276,13 +280,25 @@ class _RegisterInfo extends State<RegisterInfo> {
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () => {Navigator.of(context).pop()}, textColor: Colors.white, color: Color(0xffD02127))),
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: page == 1 ? 'personal info' : 'patient info');
}, textColor: Colors.white, color: Color(0xffD02127))),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register, () => {nextPage()},
textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)),
child: DefaultButton(
page == 1 ? TranslationBase.of(context).next : TranslationBase.of(context).register,
(){
nextPage();
page == 1
? locator<GAnalytics>().loginRegistration.registration_personal_info()
: locator<GAnalytics>().loginRegistration.registration_patient_info();
},
textColor: Colors.white, color: isValid() == true && page == 2 || page == 1 ? Color(0xff359846) : Colors.grey)
),
),
],
)));

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_reponse.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_user_status_req.dart';
import 'package:diplomaticquarterapp/models/Authentication/checkpatient_for_registration.dart';
@ -159,12 +161,18 @@ class _Register extends State<Register> {
children: [
Expanded(
child: Padding(
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () => {Navigator.of(context).pop()}, textColor: Colors.white, color: Color(0xffD02127))),
padding: EdgeInsets.all(10), child: DefaultButton(TranslationBase.of(context).cancel, () {
Navigator.of(context).pop();
locator<GAnalytics>().loginRegistration.registration_cancel(step: 'enter details');
}, textColor: Colors.white, color: Color(0xffD02127))),
),
Expanded(
child: Padding(
padding: EdgeInsets.all(10),
child: DefaultButton(TranslationBase.of(context).next, () => {startRegistration()}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
child: DefaultButton(TranslationBase.of(context).next, (){
startRegistration();
locator<GAnalytics>().loginRegistration.registration_enter_details();
}, textColor: Colors.white, color: isButtonDisabled == true ? Colors.grey : Color(0xff359846))),
),
],
)));

@ -1,3 +1,5 @@
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/login/login-type.dart';
import 'package:diplomaticquarterapp/pages/login/register.dart';
import 'package:diplomaticquarterapp/pages/login/register_new.dart';
@ -79,6 +81,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
child: DefaultButton(
TranslationBase.of(context).no,
() => {
locator<GAnalytics>().loginRegistration.visited_alhabib_group(false),
Navigator.of(context).push(FadePage(page: RegisterNew())),
},
color: CustomColors.accentColor,
@ -90,6 +93,7 @@ class _WelcomeLogin extends State<WelcomeLogin> {
child: DefaultButton(
TranslationBase.of(context).yes,
() => {
locator<GAnalytics>().loginRegistration.visited_alhabib_group(true),
Navigator.of(context).push(FadePage(page: LoginType())),
},
color: CustomColors.green,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/payment_method_select.dart';
@ -20,6 +21,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../core/model/my_balance/AdvanceModel.dart';
import 'confirm_payment_page.dart';
@ -49,6 +51,8 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectViewModel;
@override
void initState() {
super.initState();
@ -60,6 +64,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return BaseView<MyBalanceViewModel>(
onModelReady: (model) {
model.getHospitals();
@ -309,6 +314,9 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
advanceModel.mobileNumber = mobileNum;
advanceModel.patientName = patientName;
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.analytics.advancePayments.wallet_payment_details();
model.getPatientInfoByPatientIDAndMobileNumber(advanceModel).then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.Error && model.state != ViewState.ErrorLocal) {
@ -324,6 +332,8 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
).then(
(value) {
projectViewModel.analytics.advancePayments.payment_method(method: value.toString().toLowerCase(), type: 'wallet');
Navigator.push(
context,
FadePage(

@ -1,9 +1,14 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/AdvanceModel.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_info_and_mobile_number.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/apple_pay_request.dart';
import 'package:diplomaticquarterapp/models/apple_pay_response.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
@ -19,8 +24,9 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:pay/pay.dart';
import 'package:provider/provider.dart';
import 'new_text_Field.dart';
class ConfirmPaymentPage extends StatefulWidget {
@ -37,6 +43,7 @@ class ConfirmPaymentPage extends StatefulWidget {
class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
MyInAppBrowser browser;
ProjectViewModel projectViewModel;
AppSharedPreferences sharedPref = AppSharedPreferences();
@ -55,7 +62,9 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.projectID = widget.patientInfoAndMobileNumber.projectID;
if (widget.selectedPaymentMethod == "ApplePay") {
startApplePay();
} else {
projectViewModel.analytics.advancePayments.payment_otp_confirmation(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
openPayment(widget.selectedPaymentMethod, widget.authenticatedUser, double.parse(widget.advanceModel.amount), null);
}
});
@ -63,6 +72,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
void showSMSDialog(MyBalanceViewModel model) {
new SMSOTP(
context,
@ -77,6 +87,7 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
).displayDialog(context);
}
projectViewModel = Provider.of(context);
return BaseView<MyBalanceViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
@ -91,30 +102,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// ApplePayButton(
// paymentConfigurationAsset: 'applepay.json',
// paymentItems: [
// PaymentItem(
// label: 'Advance Payment',
// amount: widget.advanceModel.amount,
// status: PaymentItemStatus.final_price,
// )
// ],
// style: ApplePayButtonStyle.black,
// type: ApplePayButtonType.plain,
// width: 200,
// height: 50,
// margin: const EdgeInsets.only(top: 15.0),
// onPaymentResult: (value) {
// print(value);
// },
// onError: (error) {
// print(error);
// },
// loadingIndicator: const Center(
// child: CircularProgressIndicator(),
// ),
// ),
Text(
TranslationBase.of(context).confirmThePayment,
textAlign: TextAlign.center,
@ -210,7 +197,20 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
child: DefaultButton(
TranslationBase.of(context).confirm.toUpperCase(),
() {
// startApplePayPayment();
projectViewModel.analytics.advancePayments.payment_confirm(method: widget.selectedPaymentMethod.toLowerCase(), type: 'wallet');
GifLoaderDialogUtils.showMyDialog(context);
model
.sendActivationCodeForAdvancePayment(
patientID: int.parse(widget.advanceModel.fileNumber),
projectID: widget.advanceModel.hospitalsModel.iD)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);
if (model.state != ViewState.ErrorLocal &&
model.state != ViewState.Error) showSMSDialog(model);
});
startApplePay();
// if()
// GifLoaderDialogUtils.showMyDialog(context);
// model.sendActivationCodeForAdvancePayment(patientID: int.parse(widget.advanceModel.fileNumber), projectID: widget.advanceModel.hospitalsModel.iD).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
@ -224,19 +224,85 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
);
}
List<PaymentItem> getPaymentItems() {
List<PaymentItem> _paymentItems = [];
_paymentItems.add(PaymentItem(
label: 'Advance Payment',
amount: widget.advanceModel.amount,
status: PaymentItemStatus.final_price,
));
startApplePay() {
GifLoaderDialogUtils.showMyDialog(context);
ApplePayResponse applePayResponse;
var _paymentItems = [
PaymentItem(
label: 'Total',
amount: widget.advanceModel.amount,
status: PaymentItemStatus.final_price,
)
];
_payClient.userCanPay(PayProvider.apple_pay).then((value) async {
print(value);
final result = await _payClient.showPaymentSelector(
provider: PayProvider.apple_pay,
paymentItems: _paymentItems,
);
print(result);
applePayResponse = ApplePayResponse.fromJson(result);
callPayfortApplePayAPI(applePayResponse);
});
}
callPayfortApplePayAPI(ApplePayResponse applePayResponse) async {
DoctorsListService service = new DoctorsListService();
ApplePayRequest applePayRequest = new ApplePayRequest();
AppleHeader appleHeader = new AppleHeader();
ApplePaymentMethod applePaymentMethod = new ApplePaymentMethod();
applePayRequest.amount = widget.advanceModel.amount;
applePayRequest.currency = "SAR";
applePayRequest.language = projectViewModel.isArabic ? "ar" : "en";
applePayRequest.customername = projectViewModel.user.firstName;
applePayRequest.customerEmail = projectViewModel.user.emailAddress;
applePayRequest.orderdescription = "Advance Payment";
applePayRequest.liveServiceid = "";
applePayRequest.latitude = await this.sharedPref.getDouble(USER_LAT);
applePayRequest.longitude = await this.sharedPref.getDouble(USER_LONG);
applePayRequest.devicetoken = await sharedPref.getString(PUSH_TOKEN);
applePayRequest.clientrequestid = Utils.getAdvancePaymentTransID(widget.advanceModel.hospitalsModel.iD, int.parse(widget.advanceModel.fileNumber));
applePayRequest.projectid = widget.advanceModel.hospitalsModel.iD.toString();
applePayRequest.serviceid = "3";
applePayRequest.patientid = projectViewModel.user.patientID.toString();
applePayRequest.appleData = applePayResponse.token.data;
applePayRequest.appleSignature = applePayResponse.token.signature;
appleHeader.appleEphemeralPublicKey = applePayResponse.token.header.ephemeralPublicKey;
appleHeader.appleTransactionId = applePayResponse.token.header.transactionId;
appleHeader.applePublicKeyHash = applePayResponse.token.header.publicKeyHash;
applePaymentMethod.appleType = getApplePayPaymentType(applePayResponse.paymentMethod.type);
applePaymentMethod.appleNetwork = applePayResponse.paymentMethod.network;
applePaymentMethod.appleDisplayName = applePayResponse.paymentMethod.displayName;
applePayRequest.appleHeader = appleHeader;
applePayRequest.applePaymentMethod = applePaymentMethod;
return _paymentItems;
service.callPayfortApplePayAPI(applePayRequest, context).then((res) {
print(res);
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
// _showMyDialog(err, this.context);
});
}
void onApplePayResult(paymentResult) {
print(paymentResult);
String getApplePayPaymentType(dynamic paymentMethod) {
switch (paymentMethod) {
case 1:
return 'debit';
break;
case 2:
return 'credit';
break;
case 3:
return 'prepaid';
break;
}
return 'debit';
}
String getImagePath(String paymentMethod) {
@ -331,17 +397,6 @@ class _ConfirmPaymentPageState extends State<ConfirmPaymentPage> {
});
}
// startApplePayPayment() {
// _payClient.userCanPay(PayProvider.apple_pay).then((value) async {
// print(value);
// final result = await _payClient.showPaymentSelector(
// provider: PayProvider.apple_pay,
// paymentItems: _paymentItems,
// );
// print(result);
// });
// }
addAdvancedNumberRequest(String advanceNumber, String paymentReference, dynamic appointmentID, AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService();
service.addAdvancedNumberRequest(advanceNumber, paymentReference, appointmentID, AppGlobal.context).then((res) {

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/my_balance/patient_advance_balance_amount.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -11,14 +12,19 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_svg/svg.dart';
import 'package:provider/provider.dart';
import 'advance_payment_page.dart';
class MyBalancePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectViewModel;
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/my-balance/ar/0.png'));
return BaseView<MyBalanceViewModel>(
@ -172,6 +178,7 @@ class MyBalancePage extends StatelessWidget {
DefaultButton(
TranslationBase.of(context).createAdvancedPayment,
() {
projectViewModel.analytics.advancePayments.wallet_recharge(service_type: 'alhabib wallet');
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
},
).insideContainer,

@ -59,6 +59,7 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'payment service');
Navigator.push(context, FadePage(page: AdvancePaymentPage()));
},
child: MedicalProfileItem(
@ -75,6 +76,7 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'online check-in appointment');
navigateToToDoPage(context);
},
child: MedicalProfileItem(
@ -91,6 +93,7 @@ class PaymentService extends StatelessWidget {
medical.add(
InkWell(
onTap: () {
projectViewModel.analytics.advancePayments.payment_services(service_type: 'alhabib wallet');
Navigator.push(context, FadePage(page: MyBalancePage()));
},
child: MedicalProfileItem(

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
@ -7,16 +8,19 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'lacum-registration-page.dart';
class LakumActivationVidaPage extends StatelessWidget {
ProjectViewModel projectViewModel;
TextEditingController _identificationNumberController =
new TextEditingController();
@override
Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
projectViewModel = Provider.of(context);
return BaseView<LacumRegistrationViewModel>(
builder: (_, model, wi) => AppScaffold(
@ -72,7 +76,7 @@ class LakumActivationVidaPage extends StatelessWidget {
fontSize: 16,
hPadding: 8,
vPadding: 12,
handler: _identificationNumberController.text != null &&
handler: _identificationNumberController.text != null ||
_identificationNumberController.text != ""
? () {
model
@ -89,7 +93,7 @@ class LakumActivationVidaPage extends StatelessWidget {
.text)))
.then((status) => {
if (status == 200)
{Navigator.pop(context, "")}
{model.makeAccountActivate(projectViewModel.user.patientIdentificationNo)}
// back to previous page
})
}

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/LacumAccountInformation.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-viewmodel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/pharmacies/widgets/lacum-banner-widget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LakumSettingPage extends StatefulWidget {
final LacumAccountInformation lacumInformation;
@ -26,6 +28,8 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
TextEditingController _nameController = new TextEditingController();
TextEditingController _phoneController = new TextEditingController();
ProjectViewModel projectViewModel;
@override
void initState() {
_lakumAccountActivated = widget.lacumGroupInformation
@ -39,6 +43,7 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
@override
Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
projectViewModel = Provider.of(context);
return BaseView<LacumViewModel>(
onModelReady: (model) => model.setLakumData(
@ -126,9 +131,9 @@ class _LakumSettingPageState extends State<LakumSettingPage> {
value: _lakumAccountActivated,
onChanged: (val) {
if (_lakumAccountActivated) {
model.makeAccountDeactivate();
model.makeAccountDeactivate(projectViewModel.user.patientIdentificationNo);
} else {
model.makeAccountActivate();
model.makeAccountActivate(projectViewModel.user.patientIdentificationNo);
}
setState(() {
_lakumAccountActivated = val;

@ -27,7 +27,7 @@ class LakumMainPage extends StatelessWidget {
return BaseView<LacumViewModel>(
onModelReady: (model) async {
await model.getLacumData();
await model.getLacumData(projectViewModel.user.patientIdentificationNo);
if (model.lacumInformation.yahalaAccountNo == 0 || model.lacumInformation.yahalaAccountNo == null) {
navigateToLakumRegister(context);
} else {
@ -73,7 +73,7 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
height: 12,
),
LakumHomeButtons(mediaQuery, model),
LakumHomeButtons(mediaQuery, model, projectViewModel),
SizedBox(
height: 12,
),
@ -88,7 +88,7 @@ class LakumMainPage extends StatelessWidget {
SizedBox(
width: 8,
),
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount,
LacumPointsWidget(mediaQuery, 2, TranslationBase.of(context).gained, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmount,
model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPoints, model.lacumGroupInformation.lakumInquiryInformationObjVersion.gainedPointsAmountPerYear),
SizedBox(
width: 8,
@ -253,25 +253,26 @@ class LakumMainPage extends StatelessWidget {
navigateToLakumRegister(BuildContext context) {
Navigator.pushReplacement(context, FadePage(page: LakumRegistrationPage(projectViewModel.user.patientIdentificationNo)));
}
}
List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
return [
IconButton(
icon: Icon(Icons.settings),
color: Colors.white,
onPressed: () {
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData()});
},
),
];
List<Widget> _buildAppBarICons(BuildContext context, LacumViewModel model) {
return [
IconButton(
icon: Icon(Icons.settings),
color: Colors.white,
onPressed: () {
Navigator.push(context, FadePage(page: LakumSettingPage(model.lacumInformation, model.lacumGroupInformation))).then((result) => {model.getLacumGroupData(projectViewModel.user.patientIdentificationNo)});
},
),
];
}
}
class LakumHomeButtons extends StatelessWidget {
final MediaQueryData mediaQuery;
final LacumViewModel model;
ProjectViewModel projectViewModel;
LakumHomeButtons(this.mediaQuery, this.model);
LakumHomeButtons(this.mediaQuery, this.model, this.projectViewModel);
@override
Widget build(BuildContext context) {
@ -328,7 +329,7 @@ class LakumHomeButtons extends StatelessWidget {
child: InkWell(
onTap: () {
Navigator.push(context, FadePage(page: LacumTransferPage(model.lacumInformation, model.lacumGroupInformation))).then((result) {
model.getLacumGroupData();
model.getLacumGroupData(projectViewModel.user.patientIdentificationNo);
});
},
child: Container(

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/lacum-registration-viewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/borderedButton.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -12,8 +13,7 @@ class LakumTermsConditions extends StatelessWidget {
final String firstName, lastName, mobileNo, identificationNo;
final int languageId;
LakumTermsConditions(this.identificationNo, this.firstName, this.lastName,
this.mobileNo, this.languageId);
LakumTermsConditions(this.identificationNo, this.firstName, this.lastName, this.mobileNo, this.languageId);
@override
Widget build(BuildContext context) {
@ -37,13 +37,9 @@ class LakumTermsConditions extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (model.listUserAgreement != null &&
model.listUserAgreement.userAgreementLAKUM !=
null)
if (model.listUserAgreement != null && model.listUserAgreement.userAgreementLAKUM != null)
Html(
data: projectProvider.isArabic
? model.listUserAgreement.userAgreementLAKUMn
: model.listUserAgreement.userAgreementLAKUM,
data: projectProvider.isArabic ? model.listUserAgreement.userAgreementLAKUMn : model.listUserAgreement.userAgreementLAKUM,
),
],
),
@ -62,9 +58,12 @@ class LakumTermsConditions extends StatelessWidget {
vPadding: 12,
handler: () {
model.createNewLakumAccount("$firstName $lastName", mobileNo, identificationNo, languageId).then((status) => {
if (status == 200) {Navigator.pop(context, "")}
// back to previous page
});
if (status == 200) {Navigator.pop(context, "")} else {
Navigator.pop(context, ""),
AppToast.showErrorToast(message: model.error)
}
// back to previous page
});
},
),
),

@ -502,6 +502,68 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getOBGyneOrdersList(BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": 15,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(GET_OBGYNE_ORDERS_LIST, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getOBGyneDoctorsList(int projectID, String setupID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"ProjectID": projectID,
"SetupID": setupID,
"isDentalAllowedBackend": false,
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"PatientType": authUser.patientType
};
dynamic localRes;
await baseAppClient.post(GET_OBGYNE_DOCTORS_LIST, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async {
Map<String, dynamic> request;
@ -1448,4 +1510,28 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> updateObGyneAppointment(int episodeID, int appointmentNo, int orderNo, String procedureId, int lineItemNo, int uniqueRowID) async {
Map<String, dynamic> request;
request = {
"EpisodeID": episodeID,
"AppointmentNo": appointmentNo,
"OrderNo": orderNo,
"ProcedureId": procedureId,
"ProcedureAppointmentNo": appointmentNo,
"LineItemNo": lineItemNo,
"UniqueRowID": uniqueRowID
};
dynamic localRes;
await baseAppClient.post(UPDATE_COVID_QUESTIONNAIRE, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -5,7 +5,6 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/LiveCare/ApplePayInsertRequest.dart';
import 'package:diplomaticquarterapp/models/Request.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:flutter/material.dart';
@ -25,11 +24,7 @@ class LiveCareService extends BaseService {
authUser = data;
}
request = {
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
};
request = {"Age": authUser.age != null ? authUser.age : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Gender": authUser.gender != null ? authUser.gender : 0};
dynamic localRes;
@ -49,11 +44,7 @@ class LiveCareService extends BaseService {
authUser = data;
}
request = {
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0
};
request = {"Age": authUser.age != null ? authUser.age : 0, "PatientID": authUser.patientID != null ? authUser.patientID : 0, "Gender": authUser.gender != null ? authUser.gender : 0};
dynamic localRes;
@ -99,10 +90,6 @@ class LiveCareService extends BaseService {
authUser = data;
}
// var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// Request req = appGlobal.getPublicRequest();
// request = {"LanguageID": languageID == 'ar' ? 1 : 2, "TokenID": "", "SessionID": "YckwoXhUmWBsnHKEKig"};
dynamic localRes;
await baseAppClient.post(GET_LIVECARE_HISTORY, onSuccess: (response, statusCode) async {
@ -113,6 +100,26 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientInfoByQR(String clientID, BuildContext context) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Map<String, dynamic> request;
request = {"clientid": clientID, "patientid": authUser.patientID, "isOutKsa": authUser.outSA == 1 ? true : false, "appLang": languageID == 'ar' ? "1" : "2"};
dynamic localRes;
await baseAppClient.post("https://vcallapi.hmg.com/api/PharmaLiveCare/getPatientInfoByQR", onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request, isExternal: true);
return Future.value(localRes);
}
Future<Map> getLivecareClinicTiming(int serviceID, BuildContext context) async {
Map<String, dynamic> request;

@ -2827,7 +2827,7 @@ class TranslationBase {
String get ancillaryOrdersPaymentConfirm => localizedValues["ancillaryOrdersPaymentConfirm"][locale.languageCode];
String get covidTestTodo => localizedValues["covidTestTodo"][locale.languageCode];
String get successRegister => localizedValues["successRegister"][locale.languageCode];
String get ancillaryOrderPaymentSuccess => localizedValues["ancillaryOrderPaymentSuccess"][locale.languageCode];
String get pharmacyLiveCare => localizedValues["pharmacyLiveCare"][locale.languageCode];
}

@ -1,3 +1,5 @@
import 'package:barcode_scan2/barcode_scan2.dart';
import 'package:diplomaticquarterapp/analytics/google-analytics.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -14,12 +16,11 @@ import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStat
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notifications_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/pages/webRTC/call_page_bkp.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/services/livecare_services/livecare_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
@ -165,8 +166,10 @@ class _AppDrawerState extends State<AppDrawer> {
sharedPref.remove(CLINICS_LIST);
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to english');
} else {
projectProvider.changeLanguage('ar');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to arabic');
}
var themeNotifier = Provider.of<ThemeNotifier>(context, listen: false);
themeNotifier.setTheme(defaultTheme(fontName: projectProvider.isArabic ? 'Cairo' : 'Poppins'));
@ -191,9 +194,23 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(
MY_FAMILIY,
);
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('my family');
},
)
: SizedBox(),
InkWell(
child: DrawerItem(TranslationBase.of(context).pharmacyLiveCare, SvgPicture.asset("assets/images/new/Live_Care.svg"),
isImageIcon: true,
bottomLine: false,
textColor: Theme.of(context).textTheme.bodyText1.color,
iconColor: Theme.of(context).textTheme.bodyText1.color,
sideArrow: true,
letterSpacing: -0.84,
projectProvider: projectProvider),
onTap: () {
readQRCode();
},
),
FutureBuilder(
future: getFamilyFiles(), // async work
builder: (BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
@ -317,8 +334,10 @@ class _AppDrawerState extends State<AppDrawer> {
sharedPref.setBool(IS_ROBOT_INIT, null);
if (projectProvider.isArabic) {
projectProvider.changeLanguage('en');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to english');
} else {
projectProvider.changeLanguage('ar');
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('change language to arabic');
}
},
),
@ -363,6 +382,7 @@ class _AppDrawerState extends State<AppDrawer> {
//NotificationsPage
// Navigator.of(context).pop();
if (!projectProvider.isLoginChild) Navigator.push(context, FadePage(page: NotificationsPage()));
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('notifications');
},
),
if (projectProvider.havePrivilege(3))
@ -373,11 +393,13 @@ class _AppDrawerState extends State<AppDrawer> {
Navigator.of(context).pushNamed(
SETTINGS,
);
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('app settings');
},
),
InkWell(
child: DrawerItem(TranslationBase.of(context).rateApp, Icons.star, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('rate our app');
openAppReviewDialog();
// if (Platform.isIOS) {
// launch("https://apps.apple.com/sa/app/dr-suliaman-alhabib/id733503978");
@ -390,6 +412,7 @@ class _AppDrawerState extends State<AppDrawer> {
child: DrawerItem(TranslationBase.of(context).logout, SvgPicture.asset("assets/images/new/logout.svg"),
isImageIcon: true, bottomLine: false, letterSpacing: -0.84, fontSize: 14, projectProvider: projectProvider),
onTap: () {
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('logout');
logout();
},
)
@ -420,7 +443,13 @@ class _AppDrawerState extends State<AppDrawer> {
mHeight(12),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: CallPage()));
// Navigator.push(context, FadePage(page: CallPage()));
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('cloud solution logo tap');
String patientID = '2001273';
GifLoaderDialogUtils.showMyDialog(context);
projectProvider.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}).catchError((err) {
print(err.toString());
});
},
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
@ -504,6 +533,8 @@ class _AppDrawerState extends State<AppDrawer> {
login() async {
var data = await sharedPref.getObject(IMEI_USER_DATA);
sharedPref.remove(REGISTER_DATA_FOR_LOGIIN);
locator<GAnalytics>().loginRegistration.login_register_initiate();
if (data != null) {
Navigator.of(context).pushNamed(CONFIRM_LOGIN);
} else {
@ -544,6 +575,7 @@ class _AppDrawerState extends State<AppDrawer> {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pop();
loginAfter(value, context, user is AuthenticatedUser);
locator<GAnalytics>().hamburgerMenu.logMenuItemClick('switch to my family account');
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -612,8 +644,19 @@ class _AppDrawerState extends State<AppDrawer> {
})
.catchError((err) {
print(err);
//Utils.hideProgressDialog();
// GifLoaderDialogUtils.hideDialog(context);
});
}
readQRCode() async {
String result = (await BarcodeScanner.scan())?.rawContent;
print(result);
GifLoaderDialogUtils.showMyDialog(context);
LiveCareService service = new LiveCareService();
service.getPatientInfoByQR(result, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
});
}

@ -31,13 +31,13 @@ class MyInAppBrowser extends InAppBrowser {
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_nfc_kit/flutter_nfc_kit.dart';
void showNfcReader(BuildContext context, {Function onNcfScan}) {
void showNfcReader(BuildContext context, {Function onNcfScan, VoidCallback onCancel}) {
showModalBottomSheet(
context: context,
enableDrag: false,
@ -13,14 +13,16 @@ void showNfcReader(BuildContext context, {Function onNcfScan}) {
builder: (context) {
return NfcLayout(
onNcfScan: onNcfScan,
onCancel: onCancel,
);
});
}
class NfcLayout extends StatefulWidget {
Function onNcfScan;
VoidCallback onCancel;
NfcLayout({this.onNcfScan});
NfcLayout({this.onNcfScan, this.onCancel});
@override
_NfcLayoutState createState() => _NfcLayoutState();
@ -103,6 +105,7 @@ class _NfcLayoutState extends State<NfcLayout> {
child: RaisedButton(
onPressed: () {
// _stream?.cancel();
widget.onCancel();
Navigator.pop(context);
},
elevation: 0,

Loading…
Cancel
Save