WD: vital sign result screen modified.

dev_v3.13.6_vital_sign
taha.alam 1 year ago
parent 9090adc0d4
commit 77dcc95bac

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -0,0 +1 @@
<svg id="Icon" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" fill="#e3ebf0" r="29"/><path d="m19.41 19.41c-2.32 2.3-3.89 5.37-4.3 8.79-.13 1.02-.96 1.8-1.99 1.8h-6.03c-1.16 0-2.1-.99-2-2.15.52-6.03 3.19-11.47 7.24-15.52l1.67-.33 5 4z" fill="#54afa4"/><path d="m30 5 1 2v6l-1 2c-4.13 0-7.88 1.68-10.59 4.41l-7.08-7.08c4.53-4.53 10.78-7.33 17.67-7.33z" fill="#68cec5"/><path d="m47.67 12.33.322 1.671-4.992 4.999-2.4.41h-.01c-2.71-2.73-6.45-4.41-10.59-4.41v-10c6.89 0 13.14 2.8 17.67 7.33z" fill="#f9d84b"/><path d="m54.91 27.85c.1 1.16-.84 2.15-2 2.15h-6.03c-1.03 0-1.86-.78-1.99-1.8-.41-3.41-1.97-6.48-4.29-8.79l7.07-7.08c4.05 4.05 6.72 9.49 7.24 15.52z" fill="#f9536b"/><path d="m44.851 16.308c-2.578 3.935-7.307 10.699-12.38 15.772-1.42 1.42-3.831 1.242-4.99-.543-.846-1.284-.585-2.985.501-4.071 5.073-5.052 11.795-9.75 15.71-12.317.762-.511 1.66.397 1.159 1.159z" fill="#4d5c7a"/><g fill="#262626"><path d="m52.907 31c.842 0 1.652-.356 2.223-.979.563-.613.846-1.437.774-2.26-.52-6.072-3.192-11.804-7.527-16.139-4.916-4.916-11.442-7.623-18.377-7.623-13.385 0-24.764 10.437-25.904 23.76-.071.824.212 1.648.774 2.262.571.622 1.381.979 2.223.979h6.031c1.514 0 2.793-1.152 2.977-2.68.843-7.023 6.818-12.32 13.899-12.32 2.708 0 5.28.763 7.52 2.206-3.316 2.42-7.096 5.418-10.244 8.554-1.446 1.445-1.711 3.686-.633 5.321.705 1.088 1.837 1.788 3.105 1.922.149.016.299.023.447.023 1.115 0 2.183-.439 2.982-1.239 3.162-3.161 6.182-6.966 8.615-10.302 1.131 1.762 1.858 3.753 2.107 5.835.182 1.527 1.461 2.68 2.976 2.68h6.031zm-23.907-24.951v7.998c-3.642.227-6.984 1.666-9.583 3.957l-5.631-5.631c4.07-3.741 9.413-6.078 15.213-6.324zm-14.886 22.034c-.063.532-.48.918-.99.918h-6.031c-.283 0-.557-.12-.749-.33-.188-.205-.279-.468-.256-.739.466-5.437 2.784-10.349 6.287-14.142l5.637 5.637c-2.083 2.357-3.498 5.333-3.898 8.656zm16.886-14.041v-8.018c5.694.233 11.038 2.45 15.239 6.323l-1.715 1.715c-.465-.098-.958-.032-1.38.251-1.065.698-2.409 1.603-3.9 2.656-2.437-1.744-5.254-2.746-8.243-2.928zm.764 17.332c-.479.478-1.13.709-1.807.641-.675-.071-1.256-.434-1.641-1.026-.562-.854-.405-2.036.372-2.812 4.791-4.772 11.129-9.254 14.887-11.751-2.5 3.767-7.006 10.143-11.812 14.948zm14.123-3.29c-.317-2.644-1.303-5.16-2.852-7.329 1.05-1.489 1.953-2.831 2.651-3.896.279-.425.344-.916.249-1.379l1.704-1.704c3.593 3.905 5.822 8.885 6.273 14.157.023.271-.067.532-.256.737-.192.21-.466.33-.749.33h-6.031c-.51 0-.927-.385-.989-.917z"/><path d="m30 0c-6.367 0-12.448 1.969-17.587 5.693-.447.324-.547.949-.223 1.396s.948.548 1.396.223c4.795-3.476 10.471-5.312 16.413-5.312 15.439 0 28 12.561 28 28s-12.561 28-28 28-27.999-12.561-27.999-28c0-7.737 3.086-14.938 8.689-20.276.4-.381.416-1.014.034-1.413-.381-.402-1.015-.415-1.413-.034-6.003 5.718-9.31 13.433-9.31 21.723 0 16.542 13.458 30 30 30s30-13.458 30-30-13.458-30-30-30z"/><path d="m33 50c.553 0 1-.447 1-1v-10c0-.464-.319-.866-.771-.974-.45-.106-.917.111-1.124.526l-2.105 4.211-2.105-4.211c-.207-.415-.677-.632-1.124-.526-.451.107-.771.51-.771.974v10c0 .553.447 1 1 1s1-.447 1-1v-5.764l1.105 2.211c.34.678 1.449.678 1.789 0l1.105-2.211v5.764c0 .553.447 1 1 1z"/><path d="m44 40c.553 0 1-.447 1-1s-.447-1-1-1h-6c-.553 0-1 .447-1 1s.447 1 1 1h2v8h-2c-.553 0-1 .447-1 1s.447 1 1 1h6c.553 0 1-.447 1-1s-.447-1-1-1h-2v-8z"/><path d="m23 41.5c0-1.93-1.57-3.5-3.5-3.5h-3.5c-.553 0-1 .447-1 1v10c0 .553.447 1 1 1h3.5c1.93 0 3.5-1.57 3.5-3.5 0-.98-.407-1.864-1.058-2.5.651-.636 1.058-1.52 1.058-2.5zm-2 5c0 .827-.673 1.5-1.5 1.5h-2.5v-3h2.5c.827 0 1.5.673 1.5 1.5zm-4-3.5v-3h2.5c.827 0 1.5.673 1.5 1.5s-.673 1.5-1.5 1.5z"/></g></svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 9.9 KiB

@ -0,0 +1 @@
<svg id="Layer_3" enable-background="new 0 0 64 64" height="512" viewBox="0 0 64 64" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m62 22.04c0 2.92-.42 5.82-1.24 8.59-.82 2.78-2.04 5.43-3.63 7.89-4.02 6.22-9.57 11.29-16.12 14.74l-9.01 4.74-9.01-4.74c-6.55-3.45-12.1-8.52-16.12-14.74-.73-1.14-1.39-2.31-1.96-3.52h11.16l.93-1 6 13 5-18 4 6h9.55c.7 1.19 1.97 2 3.45 2 2.21 0 4-1.79 4-4s-1.79-4-4-4c-1.48 0-2.75.81-3.45 2h-7.55l-7-12-5 17-5-10-3.07 5h-10.57c-.05-.12-.08-.25-.12-.37-.82-2.77-1.24-5.67-1.24-8.59 0-2.66.62-5.28 1.81-7.65 1.29-2.57 3.24-4.67 5.59-6.12 2.36-1.46 5.1-2.27 7.98-2.27 3.18 0 6.2 1 8.7 2.74 2.49 1.75 4.46 4.25 5.55 7.25l.37 1.01.37-1.01c1.09-3 3.06-5.5 5.55-7.25 2.5-1.74 5.52-2.74 8.7-2.74 2.88 0 5.62.81 7.98 2.27 2.35 1.45 4.3 3.55 5.59 6.12 1.19 2.37 1.81 4.99 1.81 7.65z" fill="#ea3647"/><path d="m54.6 8.27c-2.36-1.46-5.1-2.27-7.98-2.27-3.18 0-6.2 1-8.7 2.74-2.49 1.75-4.46 4.25-5.55 7.25l-.37 1.01-.37-1.01c-1.09-3-3.06-5.5-5.55-7.25-2.5-1.74-5.52-2.74-8.7-2.74-.041 0-.081.004-.122.004-1.452 3.72-2.258 7.762-2.258 11.996 0 3.177.452 6.249 1.29 9.156l.71-1.156 5 10 5-17 7 12h7.55c.7-1.19 1.97-2 3.45-2 2.21 0 4 1.79 4 4s-1.79 4-4 4c-1.48 0-2.75-.81-3.45-2h-9.55l-4-6-3.404 12.255c5.315 5.347 12.449 8.885 20.397 9.603 4.822-3.246 8.962-7.425 12.137-12.338 1.59-2.46 2.81-5.11 3.63-7.89.82-2.77 1.24-5.67 1.24-8.59 0-2.66-.62-5.28-1.81-7.65-1.29-2.57-3.24-4.67-5.59-6.12z" fill="#fd505b"/><path d="m44.941 11.534c.574-2.063 6.032-2.742 10.097 1.296s3.39 9.503 1.284 10.087-4.416-2.006-6.887-4.505c-2.47-2.5-5.068-4.815-4.494-6.878z" fill="#ff9aa5"/><path d="m55.126 7.419c-2.558-1.582-5.499-2.419-8.506-2.419-3.321 0-6.527 1.01-9.275 2.922-2.323 1.633-4.15 3.811-5.345 6.354-1.195-2.545-3.022-4.723-5.349-6.356-2.744-1.91-5.95-2.92-9.271-2.92-3.007 0-5.948.837-8.505 2.419-2.544 1.569-4.604 3.825-5.959 6.522-1.254 2.497-1.916 5.298-1.916 8.099 0 3.018.431 6.003 1.292 8.906l.029.097c.034.116.07.234.118.347.157.37.52.61.921.61h10.57c.348 0 .67-.181.853-.477l2.128-3.467 4.195 8.391c.185.368.565.592.983.549.409-.036.755-.319.87-.714l4.346-14.774 5.831 9.996c.179.308.509.496.864.496h7.55c.354 0 .683-.188.862-.493.555-.944 1.523-1.507 2.588-1.507 1.654 0 3 1.346 3 3s-1.346 3-3 3c-1.065 0-2.033-.563-2.588-1.507-.18-.305-.508-.493-.862-.493h-9.015l-3.703-5.555c-.217-.325-.601-.499-.99-.433-.386.062-.7.343-.806.72l-4.271 15.374-4.857-10.525c-.14-.303-.421-.516-.751-.568-.321-.054-.663.062-.89.307l-.632.68h-10.725c-.343 0-.661.175-.845.465-.184.289-.206.651-.06.962.563 1.196 1.244 2.419 2.024 3.636 4.098 6.341 9.801 11.557 16.494 15.082l9.01 4.74c.147.077.307.115.467.115s.32-.038.466-.115l9.01-4.74c6.693-3.525 12.396-8.741 16.494-15.082 1.644-2.543 2.905-5.285 3.749-8.148.85-2.872 1.281-5.857 1.281-8.875 0-2.801-.662-5.602-1.916-8.099-1.355-2.697-3.415-4.953-5.958-6.522zm4.675 22.929c-.79 2.68-1.972 5.247-3.511 7.629-3.911 6.054-9.356 11.032-15.746 14.398l-8.544 4.495-8.544-4.495c-6.39-3.366-11.835-8.345-15.744-14.396-.423-.66-.816-1.322-1.173-1.979h9.531c.236 0 .464-.084.644-.234l5.378 11.653c.176.38.556.608.989.578.418-.034.771-.325.883-.729l4.415-15.896 2.789 4.184c.186.277.498.444.832.444h9.017c.947 1.263 2.397 2 3.983 2 2.757 0 5-2.243 5-5s-2.243-5-5-5c-1.586 0-3.036.737-3.983 2h-6.442l-6.71-11.504c-.201-.345-.582-.54-.985-.489-.396.049-.726.328-.838.711l-4.283 14.562-3.863-7.727c-.162-.325-.488-.536-.851-.552-.364-.031-.706.166-.896.476l-2.779 4.523h-9.271c-.73-2.58-1.099-5.256-1.099-7.96 0-2.491.589-4.981 1.703-7.202 1.188-2.365 2.994-4.343 5.224-5.718 2.241-1.387 4.818-2.12 7.453-2.12 2.911 0 5.722.886 8.125 2.559 2.394 1.682 4.187 4.023 5.187 6.775l.37 1.01c.143.394.518.656.938.656s.795-.262.938-.656l.371-1.012c.999-2.75 2.792-5.092 5.182-6.771 2.407-1.675 5.218-2.561 8.129-2.561 2.635 0 5.212.733 7.454 2.12 2.229 1.375 4.035 3.353 5.223 5.718 1.114 2.221 1.703 4.711 1.703 7.202 0 2.825-.403 5.619-1.199 8.308z"/></g></svg>

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" width="512" height="512">
<g>
<g>
<path style="fill:#D77F4A;" d="M448.268,193.522c0-6.286-2.632-11.957-6.855-15.972c-2.615-2.486-3.009-6.596-0.766-9.422&#10;&#9;&#9;&#9;c2.985-3.76,4.768-8.516,4.768-13.69c0-7.532-3.779-14.18-9.545-18.154c-2.55-1.758-3.507-5.012-2.611-7.976&#10;&#9;&#9;&#9;c0.61-2.017,0.939-4.156,0.939-6.372c0-12.171-9.867-22.038-22.038-22.038c-0.271,0-0.071-6.017-0.74-9.253&#10;&#9;&#9;&#9;c-1.918-9.281-9.745-16.43-19.169-17.43c-1.211-0.128-2.405-0.159-3.575-0.098c-4.869,0.254-8.772-3.822-8.748-8.698&#10;&#9;&#9;&#9;c0-0.048,0-0.096,0-0.144c0-15.711-12.736-28.447-28.447-28.447c-0.174,0-5.572-18.923-21.496-16.566&#10;&#9;&#9;&#9;c-2.241,0.332-4.449,0.35-6.501,0.998c-4.71,1.488-9.938,0.436-13.691-2.776c-3.767-3.224-8.658-5.172-14.005-5.172&#10;&#9;&#9;&#9;c-4.18,0-8.08,1.19-11.383,3.249c-3.962,2.47-8.786,3.357-13.275,2.075c-1.881-0.537-3.868-0.825-5.922-0.825&#10;&#9;&#9;&#9;c-2.476,0-4.854,0.418-7.068,1.187c-4.807,1.67-10.112,0.693-14.313-2.179c-3.457-2.363-7.638-3.745-12.142-3.745&#10;&#9;&#9;&#9;c-4.802,0-9.235,1.571-12.817,4.225c-4.543,3.367-10.438,4.225-15.632,1.989c-2.968-1.278-6.239-1.986-9.676-1.986&#10;&#9;&#9;&#9;c-8.8,0-16.516,4.636-20.841,11.599c-2.887,4.648-7.74,7.748-13.208,7.944c-0.279,0.01-0.558,0.024-0.839,0.042&#10;&#9;&#9;&#9;c-14.402,0.942-26.008,12.822-26.575,27.244c-0.019,0.481-0.026,0.959-0.021,1.434c0.049,4.851-4.092,8.753-8.939,8.542&#10;&#9;&#9;&#9;c-1.105-0.048-2.231-0.015-3.372,0.105c-9.425,0.994-17.256,8.14-19.18,17.42c-0.672,3.24-0.472,9.263-0.743,9.263&#10;&#9;&#9;&#9;c-12.171,0-22.038,9.867-22.038,22.038c0,2.216,0.328,4.355,0.938,6.372c0.897,2.965-0.061,6.219-2.611,7.976&#10;&#9;&#9;&#9;c-5.765,3.974-9.545,10.622-9.545,18.154c0,5.174,1.783,9.93,4.768,13.69c2.243,2.826,1.849,6.936-0.766,9.422&#10;&#9;&#9;&#9;c-4.222,4.014-6.855,9.685-6.855,15.972c0,8.699,5.041,16.216,12.36,19.798c3.401,1.664,4.745,5.766,3.32,9.274&#10;&#9;&#9;&#9;c-1.279,3.149-1.851,6.66-1.517,10.338c0.922,10.154,8.945,18.467,19.054,19.791c2.827,0.37,5.555,0.183,8.114-0.439&#10;&#9;&#9;&#9;c-0.017,0.35-0.027,0.702-0.027,1.057c0,12.171,9.867,22.038,22.038,22.038c5.29,0,10.144-1.866,13.943-4.973&#10;&#9;&#9;&#9;c3.148,8.325,11.189,14.246,20.616,14.246c12.171,0,176.557,0,188.729,0c9.427,0,17.468-5.921,20.616-14.246&#10;&#9;&#9;&#9;c3.798,3.107,8.652,4.973,13.942,4.973c12.171,0,22.038-9.867,22.038-22.038c0-0.354-0.01-0.706-0.027-1.057&#10;&#9;&#9;&#9;c2.57,0.625,5.311,0.811,8.15,0.434c10.11-1.341,18.119-9.671,19.022-19.829c0.325-3.661-0.246-7.155-1.519-10.29&#10;&#9;&#9;&#9;c-1.425-3.51-0.084-7.614,3.318-9.279C443.227,209.738,448.268,202.22,448.268,193.522z"/>
<path style="fill:#FFD15B;" d="M411.446,372.3c-64.616,2.692-95.255-14.6-95.255-14.6l-60.121-11.895l0.003-0.428l-1.084,0.214&#10;&#9;&#9;&#9;l-1.084-0.214l0.003,0.428l-60.121,11.895c0,0-30.64,17.293-95.255,14.6L68.204,499.925h186.784H442.13L411.446,372.3z"/>
<path style="fill:#FFCEBF;" d="M291.728,291.481L291.728,291.481l-73.48,0v0c0,24.283-8.675,47.767-24.462,66.218l1.927,2.216&#10;&#9;&#9;&#9;c4.985,5.734,11.021,10.48,17.819,13.873c25.887,12.92,56.359,13.044,82.306,0.439c7.961-3.867,14.902-9.554,20.352-16.528v0&#10;&#9;&#9;&#9;C300.403,339.248,291.728,315.764,291.728,291.481z"/>
<path style="fill:#D77F4A;" d="M137.497,142.363c3.02,23.928,10.565,42.042,10.565,42.042l215.877,0&#10;&#9;&#9;&#9;c0,0,9.996-14.52,19.282-37.554"/>
<ellipse style="fill:#FFCEBF;" cx="256" cy="197.248" rx="108.427" ry="135.37"/>
<path style="fill:#FFBBAA;" d="M313.264,82.287c19.269,24.435,31.163,57.962,31.163,94.961c0,74.763-48.545,135.37-108.427,135.37&#10;&#9;&#9;&#9;c-21.024,0-40.646-7.478-57.264-20.409c19.667,24.94,47.017,40.409,77.264,40.409c59.883,0,108.427-60.607,108.427-135.37&#10;&#9;&#9;&#9;C364.427,148.733,343.981,106.187,313.264,82.287z"/>
<path style="fill:#D77F4A;" d="M256,56.149c-56.413,0-107.939,58.157-107.939,128.256l0,0c0,0,31.222-60.851,53.686-44.804&#10;&#9;&#9;&#9;c21.226,15.161,38.065,15.919,54.252,15.919c16.187,0,33.026-0.758,54.252-15.919c22.465-16.046,53.686,44.804,53.686,44.804l0,0&#10;&#9;&#9;&#9;C364.427,114.305,312.413,56.149,256,56.149z"/>
<path style="fill:#FFE177;" d="M169.835,248.2l-27.1-10.507l-27.1-10.507c0,0-81.573,129.986-99.523,176.281&#10;&#9;&#9;&#9;s-7.257,79.017,26.618,92.151c33.874,13.134,63.831-3.827,81.781-50.122S169.835,248.2,169.835,248.2z"/>
<path style="fill:#FFCEBF;" d="M124.683,230.694l-1.69-33.678c-0.815-16.248,5.815-31.983,18.013-42.748l46.186-40.76&#10;&#9;&#9;&#9;c2.712-2.394,6.358-3.438,9.926-2.843l0,0c5.794,0.966,10.04,5.979,10.04,11.852v4.179c0,3.777-1.262,7.446-3.585,10.424&#10;&#9;&#9;&#9;l-21.125,29.884c-11.073,15.664-17.019,34.376-17.019,53.559v25.929L124.683,230.694z"/>
<path style="fill:#FFE177;" d="M342.165,248.2l27.1-10.507l27.1-10.507c0,0,81.573,129.986,99.523,176.281&#10;&#9;&#9;&#9;s7.257,79.017-26.618,92.151c-33.874,13.134-63.831-3.827-81.781-50.122C369.539,399.201,342.165,248.2,342.165,248.2z"/>
<path style="fill:#FFD15B;" d="M495.887,403.467c-17.95-46.295-99.523-176.281-99.523-176.281l-24.167,9.37&#10;&#9;&#9;&#9;c18.974,30.625,78.653,128.128,93.69,166.911c17.95,46.295,7.257,79.017-26.617,92.151c-2.073,0.804-4.131,1.491-6.173,2.07&#10;&#9;&#9;&#9;c11.214,3.55,23.415,2.877,36.173-2.07C503.144,482.484,513.837,449.762,495.887,403.467z"/>
<path style="fill:#FFCEBF;" d="M387.317,230.694l1.69-33.678c0.815-16.248-5.815-31.983-18.013-42.748l-46.186-40.76&#10;&#9;&#9;&#9;c-2.712-2.394-6.358-3.438-9.926-2.843l0,0c-5.794,0.966-10.04,5.979-10.04,11.852v4.179c0,3.777,1.262,7.446,3.585,10.424&#10;&#9;&#9;&#9;l21.125,29.884c11.073,15.664,17.019,34.376,17.019,53.559v25.929L387.317,230.694z"/>
</g>
<g>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M415.086,252.718c10.11-1.341,18.119-9.671,19.022-19.829c0.325-3.661-0.246-7.155-1.519-10.29&#10;&#9;&#9;&#9;c-1.425-3.51-0.084-7.614,3.318-9.279c7.319-3.582,12.36-11.1,12.36-19.798c0-6.286-2.632-11.957-6.855-15.972&#10;&#9;&#9;&#9;c-2.615-2.486-3.009-6.596-0.766-9.422c2.985-3.76,4.768-8.516,4.768-13.69c0-7.532-3.779-14.18-9.545-18.154&#10;&#9;&#9;&#9;c-2.55-1.758-3.507-5.012-2.611-7.976c0.61-2.017,0.939-4.156,0.939-6.372c0-12.171-9.867-22.038-22.038-22.038&#10;&#9;&#9;&#9;c-0.271,0-0.071-6.017-0.74-9.253c-1.918-9.281-9.745-16.43-19.169-17.43c-1.211-0.128-2.405-0.159-3.575-0.098&#10;&#9;&#9;&#9;c-4.869,0.254-8.772-3.822-8.748-8.698c0-0.048,0-0.096,0-0.144c0-15.711-12.736-28.447-28.447-28.447&#10;&#9;&#9;&#9;c-0.174,0-5.572-18.923-21.496-16.566c-2.241,0.332-4.449,0.35-6.501,0.998c-4.71,1.488-9.938,0.436-13.691-2.776&#10;&#9;&#9;&#9;c-3.767-3.224-8.658-5.172-14.005-5.172c-4.18,0-8.08,1.19-11.383,3.249c-3.962,2.47-8.786,3.357-13.275,2.075&#10;&#9;&#9;&#9;c-1.881-0.537-3.868-0.825-5.922-0.825c-2.476,0-4.854,0.418-7.068,1.187c-4.807,1.67-10.112,0.693-14.313-2.179&#10;&#9;&#9;&#9;c-3.457-2.363-7.638-3.745-12.142-3.745c-4.802,0-9.235,1.571-12.817,4.225c-4.543,3.367-10.438,4.225-15.632,1.989&#10;&#9;&#9;&#9;c-2.968-1.278-6.239-1.986-9.676-1.986c-8.8,0-16.516,4.636-20.841,11.599c-2.887,4.648-7.74,7.748-13.208,7.944&#10;&#9;&#9;&#9;c-0.279,0.01-0.558,0.024-0.839,0.042c-14.402,0.942-26.008,12.822-26.575,27.244c-0.019,0.481-0.026,0.959-0.021,1.434&#10;&#9;&#9;&#9;c0.049,4.851-4.092,8.753-8.939,8.542c-1.105-0.048-2.231-0.015-3.372,0.105c-9.425,0.994-17.256,8.14-19.18,17.42&#10;&#9;&#9;&#9;c-0.672,3.24-0.472,9.263-0.743,9.263c-12.171,0-22.038,9.867-22.038,22.038c0,2.216,0.328,4.355,0.938,6.372&#10;&#9;&#9;&#9;c0.897,2.965-0.061,6.219-2.611,7.976c-5.765,3.974-9.545,10.622-9.545,18.154c0,5.174,1.783,9.93,4.768,13.69&#10;&#9;&#9;&#9;c2.243,2.826,1.849,6.936-0.766,9.422c-4.222,4.014-6.855,9.685-6.855,15.972c0,8.699,5.041,16.216,12.36,19.798&#10;&#9;&#9;&#9;c3.401,1.664,4.745,5.766,3.32,9.274c-1.279,3.149-1.851,6.66-1.517,10.338c0.922,10.154,8.945,18.467,19.054,19.791"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M201.748,139.601c21.226,15.161,38.065,15.919,54.252,15.919c16.187,0,33.026-0.758,54.252-15.919"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="35.204" y1="223.363" x2="35.204" y2="227.85"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="35.204" y1="261.166" x2="35.204" y2="256.678"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="53.103" y1="242.264" x2="48.615" y2="242.264"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="17.306" y1="242.264" x2="21.794" y2="242.264"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M363.942,370.537c-32.235-4.08-47.751-12.838-47.751-12.838"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="374.066" y1="499.925" x2="442.13" y2="499.925"/>
<polyline style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" points="&#10;&#9;&#9;&#9;68.204,499.925 254.988,499.925 340.066,499.925 &#9;&#9;"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M193.786,357.699c0,0-15.865,8.954-48.838,12.973"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M212.237,325.956c-4.145,11.522-10.365,22.293-18.45,31.743l1.927,2.216c4.985,5.734,11.021,10.48,17.819,13.873&#10;&#9;&#9;&#9;c25.887,12.92,56.359,13.044,82.306,0.439c7.961-3.867,14.902-9.554,20.352-16.528v0c-8.202-9.586-14.484-20.53-18.627-32.239"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M345.91,272.934c-19.485,36.009-52.483,59.683-89.91,59.683c-37.853,0-71.176-24.217-90.571-60.919"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M61.79,316.421c-19.28,33.219-38.119,67.552-45.678,87.046c-17.95,46.295-7.257,79.017,26.618,92.151&#10;&#9;&#9;&#9;c33.874,13.134,63.831-3.827,81.781-50.122S169.835,248.2,169.835,248.2l-27.1-10.507l-27.1-10.507&#10;&#9;&#9;&#9;c0,0-16.714,26.634-36.675,60.083"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M32.38,16.905l7.925,23.552c1.414,4.203,6.751,5.46,9.892,2.329l8.161-8.135c3.103-3.093,8.368-1.911,9.851,2.212l8.999,25.015"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="473.796" y1="233.363" x2="473.796" y2="237.85"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="473.796" y1="271.166" x2="473.796" y2="266.678"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="455.897" y1="252.264" x2="460.385" y2="252.264"/>
<line style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" x1="491.694" y1="252.264" x2="487.206" y2="252.264"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M483.621,16.905l-7.925,23.552c-1.414,4.203-6.751,5.46-9.892,2.329l-8.161-8.135c-3.103-3.093-8.368-1.911-9.851,2.212&#10;&#9;&#9;&#9;l-8.999,25.015"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M124.683,230.694l-1.69-33.678c-0.815-16.248,5.815-31.983,18.013-42.748l46.186-40.76c2.712-2.394,6.358-3.438,9.926-2.843l0,0&#10;&#9;&#9;&#9;c5.794,0.966,10.04,5.979,10.04,11.852v4.179c0,3.777-1.262,7.446-3.585,10.424l-21.125,29.884&#10;&#9;&#9;&#9;c-11.073,15.664-17.019,34.376-17.019,53.559v25.929L124.683,230.694z"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M450.21,316.421c19.28,33.219,38.119,67.552,45.678,87.046c17.95,46.295,7.257,79.017-26.618,92.151&#10;&#9;&#9;&#9;c-33.874,13.134-63.831-3.827-81.781-50.122c-17.95-46.295-45.324-197.296-45.324-197.296l27.1-10.507l27.1-10.507&#10;&#9;&#9;&#9;c0,0,16.714,26.634,36.675,60.083"/>
<path style="fill:none;stroke:#000000;stroke-width:15;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;" d="&#10;&#9;&#9;&#9;M387.317,230.694l1.69-33.678c0.815-16.248-5.815-31.983-18.013-42.748l-46.186-40.76c-2.712-2.394-6.358-3.438-9.926-2.843l0,0&#10;&#9;&#9;&#9;c-5.794,0.966-10.04,5.979-10.04,11.852v4.179c0,3.777,1.262,7.446,3.585,10.424l21.125,29.884&#10;&#9;&#9;&#9;c11.073,15.664,17.019,34.376,17.019,53.559v25.929L387.317,230.694z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 13 KiB

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.1"
id="svg696"
xml:space="preserve"
width="682.66669"
height="682.66669"
viewBox="0 0 682.66669 682.66669"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs700"><clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath710"><path
d="M 0,512 H 512 V 0 H 0 Z"
id="path708" /></clipPath></defs><g
id="g702"
transform="matrix(1.3333333,0,0,-1.3333333,0,682.66667)"><g
id="g704"><g
id="g706"
clip-path="url(#clipPath710)"><g
id="g712"
transform="translate(9.0435,355.2871)"><path
d="m 0,0 c 0.338,7.053 1.429,13.958 3.178,20.649 0.142,0.541 0.287,1.08 0.437,1.618 3.918,14.057 10.739,27.135 19.571,38.611 21.46,27.886 54.8,46.31 87.238,46.31 37.457,0 69.076,-22.555 83.697,-35.027 4.971,-4.241 12.285,-4.164 17.183,0.161 14.161,12.505 44.933,34.866 83.904,34.866 52.616,0 107.611,-48.482 110.423,-107.188 0.878,-18.368 -1.675,-34.297 -6.411,-48.745 -3.814,-11.637 -9.041,-22.316 -15.057,-32.515 -19.996,-33.905 -115.745,-106.958 -157.552,-142.348 -13.836,-11.712 -34.105,-11.709 -47.936,0.009 C 136.981,-188.276 41.584,-115.437 21.468,-81.26 12.443,-65.927 5.214,-49.612 1.863,-30.601 0.196,-21.138 -0.527,-11.02 0,0"
style="fill:#ff7d97;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path714" /></g><g
id="g716"
transform="translate(262.0469,153.4565)"><path
d="m 0,0 c -9.998,-8.147 -19.031,-15.546 -26.392,-21.777 -13.837,-11.713 -34.105,-11.709 -47.937,0.009 -41.693,35.323 -137.09,108.162 -157.206,142.338 -9.025,15.333 -16.255,31.649 -19.605,50.66 -0.343,1.947 -0.647,3.922 -0.907,5.927"
style="fill:none;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path718" /></g><g
id="g720"
transform="translate(34.6689,419.2329)"><path
d="m 0,0 c 21.497,26.161 53.565,43.242 84.798,43.242 37.458,0 69.076,-22.555 83.697,-35.027 4.971,-4.241 12.286,-4.164 17.184,0.161 14.161,12.505 44.932,34.866 83.903,34.866 52.616,0 107.611,-48.482 110.424,-107.188 0.878,-18.367 -1.676,-34.297 -6.411,-48.745 -1.877,-5.726 -4.096,-11.221 -6.583,-16.54"
style="fill:none;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path722" /></g><g
id="g724"
transform="translate(12.3311,376.3408)"><path
d="M 0,0 V 0"
style="fill:none;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path726" /></g><g
id="g728"
transform="translate(502,169.7637)"><path
d="m 0,0 c 0,-66.406 -53.399,-120.239 -119.271,-120.239 -65.872,0 -119.271,53.833 -119.271,120.239 0,66.406 53.399,120.239 119.271,120.239 C -53.399,120.239 0,66.406 0,0"
style="fill:#faf7f5;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path730" /></g><g
id="g732"
transform="translate(502,169.7637)"><path
d="m 0,0 c 0,-66.406 -53.399,-120.239 -119.271,-120.239 -65.872,0 -119.271,53.833 -119.271,120.239 0,66.406 53.399,120.239 119.271,120.239 C -53.399,120.239 0,66.406 0,0 Z"
style="fill:none;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path734" /></g><g
id="g736"
transform="translate(430.6279,194.124)"><path
d="m 0,0 h -23.744 v 23.952 c 0,6.765 -5.44,12.248 -12.15,12.248 h -24.01 c -6.71,0 -12.15,-5.483 -12.15,-12.248 V 0 h -23.744 c -6.71,0 -12.149,-5.483 -12.149,-12.248 v -24.225 c 0,-6.764 5.439,-12.247 12.149,-12.247 h 23.744 v -23.953 c 0,-6.764 5.44,-12.247 12.15,-12.247 h 24.01 c 6.71,0 12.15,5.483 12.15,12.247 V -48.72 H 0 c 6.71,0 12.149,5.483 12.149,12.247 v 24.225 C 12.149,-5.483 6.71,0 0,0"
style="fill:#ff9eb1;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path738" /></g><g
id="g740"
transform="translate(430.6279,194.124)"><path
d="m 0,0 h -23.744 v 23.952 c 0,6.765 -5.44,12.248 -12.15,12.248 h -24.01 c -6.71,0 -12.15,-5.483 -12.15,-12.248 V 0 h -23.744 c -6.71,0 -12.149,-5.483 -12.149,-12.248 v -24.225 c 0,-6.764 5.439,-12.247 12.149,-12.247 h 23.744 v -23.953 c 0,-6.764 5.44,-12.247 12.15,-12.247 h 24.01 c 6.71,0 12.15,5.483 12.15,12.247 V -48.72 H 0 c 6.71,0 12.149,5.483 12.149,12.247 v 24.225 C 12.149,-5.483 6.71,0 0,0 Z"
style="fill:none;stroke:#000000;stroke-width:20;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;stroke-dasharray:none;stroke-opacity:1"
id="path742" /></g></g></g></g></svg>

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -2140,4 +2140,19 @@ const Map localizedValues = {
"download": {"en": "Download", "ar": "تحميل"},
"share": {"en": "Share", "ar": "يشارك"},
"stress": {"en": "Stress", "ar": "ضغط"},
"cvd": {"en": "Cardiovascular Disease (CVD) Risk", "ar": "مخاطر أمراض القلب والأوعية الدموية (CVD)"},
"generalWellness": {"en": "General Wellness", "ar": "العافية العامة"},
"BMI": {"en": "BMI", "ar": "مؤشر كتله الجسم"},
"respiratoryRate": {"en": "Respiratory Rate", "ar": "معدل التنفس"},
"oxygenSaturation": {"en": "Oxygen Saturation", "ar": "تشبع الأكسجين"},
"scanning": {"en": "Scanning", "ar": "المسح الضوئي"},
"normal": {"en": "Normal", "ar": "عادي"},
"poor": {"en": "Poor", "ar": "فقير"},
"low": {"en": "Low", "ar": "منخفض"},
"atRisk": {"en": "At Risk", "ar": "في خطر"},
"high": {"en": "High", "ar": "عال"},
"moderatelyHigh": {"en": "Moderately high", "ar": "مرتفع بشكل معتدل"},
"possiblyLow": {"en": "Possibly low", "ar": "ربما منخفض"},
"slightylyHigh": {"en": "Slightly high", "ar": "مرتفع قليلا"},
};

@ -41,6 +41,7 @@ import 'package:diplomaticquarterapp/uitl/penguin_method_channel.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/vital_signs/result_screen.dart';
import 'package:diplomaticquarterapp/vital_signs/vital_sign.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/covid_consent_dialog.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/location_selection_dialog.dart';
@ -50,6 +51,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:vital_sign_camera/vital_sign_camera.dart';
import '../../../locator.dart';
import '../landing_page_pharmcy.dart';
@ -230,9 +232,11 @@ class ServicesView extends StatelessWidget {
} else if (hmgServices.action == 1) {
openLiveCare(context);
} else if (hmgServices.action == 2) {
//todo for temporary basis
Navigator.push(context, FadePage(page: VitalSigns()));
//todo for temporary basis
// Navigator.push(context, FadePage(page: ResultScreen(
// healthResult: Health(null, null, VitalSign(92,1, 1, null,null,null,null,null,null,null,null,null, null,null,null,null), null,null,),
// )));
// initPenguinSDK();

@ -3044,7 +3044,48 @@ class TranslationBase {
String get download => localizedValues["download"][locale.languageCode];
String get share => localizedValues["share"][locale.languageCode];
String get scanning => localizedValues["scanning"][locale.languageCode];
String get normal => localizedValues["normal"][locale.languageCode];
String get poor => localizedValues["poor"][locale.languageCode];
String get high => localizedValues["high"][locale.languageCode];
String get low => localizedValues["low"][locale.languageCode];
String get atRisk => localizedValues["atRisk"][locale.languageCode];
String get slightlyHigh => localizedValues["slightlyHigh"][locale.languageCode];
String get possiblyLow => localizedValues["possiblyLow"][locale.languageCode];
String get moderatelyHigh => localizedValues["moderatelyHigh"][locale.languageCode];
String get oxygenSaturation => localizedValues["oxygenSaturation"][locale.languageCode];
String get stress => localizedValues["stress"][locale.languageCode];
String get respiratoryRate => localizedValues["respiratoryRate"][locale.languageCode];
String get BMI => localizedValues["respiratoryRate"][locale.languageCode];
String get generalWellness => localizedValues["generalWellness"][locale.languageCode];
String get cvd => localizedValues["cvd"][locale.languageCode];
String getValue(String name) {
switch (name) {
case 'normal':
return normal;
case 'poor':
return poor;
case 'good':
return good;
case 'excellent':
return excellent;
case 'high':
return high;
case 'low':
return low;
case 'atRisk':
return atRisk;
case 'slightlyHigh':
return slightlyHigh;
case 'possiblyLow':
return possiblyLow;
case 'moderatelyHigh':
return moderatelyHigh;
default:
throw ArgumentError('Invalid name: $name');
}
}
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,222 +1,222 @@
import 'package:flutter/material.dart';
import 'package:vital_sign_camera/vital_sign_camera.dart';
import 'vital_sign_widget.dart';
class HealthResultWidget extends StatelessWidget {
final Size deviceSize;
final void Function() onTap;
final Health? healthResult;
late final VitalSign? _vitalSign;
late final HolisticAnalysis? _holisticAnalysis;
late final CardiovascularRisks? _cardiovascularRisks;
late final CovidRisk? _covidRisk;
late final ScanParameters? _scanParameters;
HealthResultWidget({
Key? key,
required this.deviceSize,
required this.onTap,
required this.healthResult,
}) : super(key: key) {
_vitalSign = healthResult?.vitalSigns;
_holisticAnalysis = healthResult?.holisticHealth;
_cardiovascularRisks = healthResult?.risks?.cardiovascularRisks;
_covidRisk = healthResult?.risks?.covidRisk;
_scanParameters = healthResult?.scanParameters;
}
@override
Widget build(BuildContext context) {
return Positioned(
top: deviceSize.height * 0.07,
left: deviceSize.width * 0.05,
child: GestureDetector(
onTap: onTap,
child: SizedBox(
width: deviceSize.width * 0.9,
child: Container(
color: Colors.black38,
child: Padding(
padding: const EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
child: const Text(
"Vital Signs",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
VitalSignWidget(
vitalSignName: "Heart Rate",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.heartRate)),
VitalSignWidget(
vitalSignName: "SPO2",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.spo2)),
VitalSignWidget(
vitalSignName: "IBI",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.ibi)),
if (_vitalSign?.stress != null)
VitalSignWidget(
vitalSignName: "Stress",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.stress)),
if (_vitalSign?.respiratoryRate != null)
VitalSignWidget(
vitalSignName: "Respiratory Rate",
vitalSignValue: formatValueToTwoDp(
healthResult
?.vitalSigns.respiratoryRate)),
if (_vitalSign?.hrvRmssd != null)
VitalSignWidget(
vitalSignName: "HRV RMSSD",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.hrvRmssd)),
if (_vitalSign?.hrvSdnn != null)
VitalSignWidget(
vitalSignName: "HRV SDNN",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.hrvSdnn)),
if (_vitalSign?.temperature != null)
VitalSignWidget(
vitalSignName: "Temperature",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.temperature)),
if (_vitalSign?.bloodPressure != null)
VitalSignWidget(
vitalSignName: "Blood Pressure",
vitalSignValue:
healthResult?.vitalSigns.bloodPressure ??
""),
if (_vitalSign?.bloodPressureSystolic != null)
VitalSignWidget(
vitalSignName: "Blood Pressure Systolic",
vitalSignValue: formatValueToTwoDp(
healthResult
?.vitalSigns.bloodPressureSystolic)),
if (_vitalSign?.bloodPressureDiastolic != null)
VitalSignWidget(
vitalSignName: "Blood Pressure Diastolic",
vitalSignValue: formatValueToTwoDp(
healthResult
?.vitalSigns.bloodPressureDiastolic)),
if (_holisticAnalysis != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Holistic Analysis",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_holisticAnalysis != null &&
_holisticAnalysis?.bmi != null)
VitalSignWidget(
vitalSignName: "BMI",
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.bmi)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.generalWellness != null)
VitalSignWidget(
vitalSignName: "General Wellness",
vitalSignValue: formatValueToTwoDp(
healthResult
?.holisticHealth?.generalWellness)),
if (_cardiovascularRisks != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Cardiovascular Risks",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_cardiovascularRisks != null)
VitalSignWidget(
vitalSignName: "General",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.cardiovascularRisks
?.generalRisk)),
if (_cardiovascularRisks != null)
VitalSignWidget(
vitalSignName: "Congestive Heart Failure",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.cardiovascularRisks
?.congestiveHeartFailure)),
if (_cardiovascularRisks != null)
VitalSignWidget(
vitalSignName: "Coronary Heart Disease",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.cardiovascularRisks
?.coronaryHeartDisease)),
if (_cardiovascularRisks != null)
VitalSignWidget(
vitalSignName: "Intermittent Claudication",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.cardiovascularRisks
?.intermittentClaudication)),
if (_cardiovascularRisks != null)
VitalSignWidget(
vitalSignName: "Stroke",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.cardiovascularRisks
?.stroke)),
if (_covidRisk != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Covid Risks",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_covidRisk != null)
VitalSignWidget(
vitalSignName: "Risk",
vitalSignValue: formatValueToTwoDp(
healthResult
?.risks?.covidRisk?.covidRisk)),
if (_scanParameters != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Scan Parameters",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_scanParameters != null)
VitalSignWidget(
vitalSignName: "Signal Quality",
vitalSignValue: formatValueToTwoDp(
healthResult
?.scanParameters?.signalQuality)),
])))),
));
}
String formatValueToTwoDp(double? value) {
return (value != null) ? value.toStringAsFixed(2) : "";
}
}
// import 'package:flutter/material.dart';
// import 'package:vital_sign_camera/vital_sign_camera.dart';
// import 'vital_sign_widget.dart';
//
// class HealthResultWidget extends StatelessWidget {
// final Size deviceSize;
// final void Function() onTap;
// final Health? healthResult;
//
// late final VitalSign? _vitalSign;
// late final HolisticAnalysis? _holisticAnalysis;
// late final CardiovascularRisks? _cardiovascularRisks;
// late final CovidRisk? _covidRisk;
// late final ScanParameters? _scanParameters;
//
// HealthResultWidget({
// Key? key,
// required this.deviceSize,
// required this.onTap,
// required this.healthResult,
// }) : super(key: key) {
// _vitalSign = healthResult?.vitalSigns;
// _holisticAnalysis = healthResult?.holisticHealth;
// _cardiovascularRisks = healthResult?.risks?.cardiovascularRisks;
// _covidRisk = healthResult?.risks?.covidRisk;
// _scanParameters = healthResult?.scanParameters;
// }
//
// @override
// Widget build(BuildContext context) {
// return Positioned(
// top: deviceSize.height * 0.07,
// left: deviceSize.width * 0.05,
// child: GestureDetector(
// onTap: onTap,
// child: SizedBox(
// width: deviceSize.width * 0.9,
// child: Container(
// color: Colors.black38,
// child: Padding(
// padding: const EdgeInsets.all(15),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Container(
// margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
// child: const Text(
// "Vital Signs",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// VitalSignWidget(
// vitalSignName: "Heart Rate",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.heartRate)),
// VitalSignWidget(
// vitalSignName: "SPO2",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.spo2)),
// VitalSignWidget(
// vitalSignName: "IBI",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.ibi)),
// if (_vitalSign?.stress != null)
// VitalSignWidget(
// vitalSignName: "Stress",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.stress)),
// if (_vitalSign?.respiratoryRate != null)
// VitalSignWidget(
// vitalSignName: "Respiratory Rate",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.vitalSigns.respiratoryRate)),
// if (_vitalSign?.hrvRmssd != null)
// VitalSignWidget(
// vitalSignName: "HRV RMSSD",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.hrvRmssd)),
// if (_vitalSign?.hrvSdnn != null)
// VitalSignWidget(
// vitalSignName: "HRV SDNN",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.hrvSdnn)),
// if (_vitalSign?.temperature != null)
// VitalSignWidget(
// vitalSignName: "Temperature",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.temperature)),
// if (_vitalSign?.bloodPressure != null)
// VitalSignWidget(
// vitalSignName: "Blood Pressure",
// vitalSignValue:
// healthResult?.vitalSigns.bloodPressure ??
// ""),
// if (_vitalSign?.bloodPressureSystolic != null)
// VitalSignWidget(
// vitalSignName: "Blood Pressure Systolic",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.vitalSigns.bloodPressureSystolic)),
// if (_vitalSign?.bloodPressureDiastolic != null)
// VitalSignWidget(
// vitalSignName: "Blood Pressure Diastolic",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.vitalSigns.bloodPressureDiastolic)),
// if (_holisticAnalysis != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Holistic Analysis",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.bmi != null)
// VitalSignWidget(
// vitalSignName: "BMI",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.holisticHealth?.bmi)),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.generalWellness != null)
// VitalSignWidget(
// vitalSignName: "General Wellness",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.holisticHealth?.generalWellness)),
// if (_cardiovascularRisks != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Cardiovascular Risks",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// vitalSignName: "General",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.cardiovascularRisks
// ?.generalRisk)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// vitalSignName: "Congestive Heart Failure",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.cardiovascularRisks
// ?.congestiveHeartFailure)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// vitalSignName: "Coronary Heart Disease",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.cardiovascularRisks
// ?.coronaryHeartDisease)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// vitalSignName: "Intermittent Claudication",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.cardiovascularRisks
// ?.intermittentClaudication)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// vitalSignName: "Stroke",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.cardiovascularRisks
// ?.stroke)),
// if (_covidRisk != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Covid Risks",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_covidRisk != null)
// VitalSignWidget(
// vitalSignName: "Risk",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.risks?.covidRisk?.covidRisk)),
// if (_scanParameters != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Scan Parameters",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_scanParameters != null)
// VitalSignWidget(
// vitalSignName: "Signal Quality",
// vitalSignValue: formatValueToTwoDp(
// healthResult
// ?.scanParameters?.signalQuality)),
// ])))),
// ));
// }
//
// String formatValueToTwoDp(double? value) {
// return (value != null) ? value.toStringAsFixed(2) : "";
// }
// }

@ -25,7 +25,7 @@ class ScanCondition extends StatelessWidget {
scanConditionName,
style: const TextStyle(
fontSize: 14,
color: Colors.white,
color: Colors.black,
fontWeight: FontWeight.bold,
),
),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart';
import 'package:vital_sign_camera/vital_sign_camera.dart';
import 'scan_condition.dart';
@ -15,60 +16,71 @@ class ScanConditionChecklist extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Positioned(
top: deviceSize.height * 0.12,
left: deviceSize.width * 0.05,
child: SizedBox(
width: deviceSize.width * 0.9,
child: Container(
color: Colors.black38,
child: Padding(
padding: const EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Scanning Conditions",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
return SizedBox(
height: deviceSize.width*0.35,
child: Material(
color:Colors.white,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
"Scanning Conditions",
style: TextStyle(
fontSize: 15,
color: CustomColors.accentColor,
fontWeight: FontWeight.bold,
),
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
child: Row(
children: [
Expanded(
child: Column(
children: [
ScanCondition(
scanConditionName: "Lighting",
isConditionSatisfied: conditions.lighting,
),
ScanCondition(
scanConditionName: "Distance",
isConditionSatisfied: conditions.distance,
),
ScanCondition(
scanConditionName: "Centered",
isConditionSatisfied: conditions.centered,
),
],
),
),
),
Padding(
padding: const EdgeInsets.fromLTRB(0, 10, 0, 0),
child: Column(
children: [
ScanCondition(
scanConditionName: "Lighting",
isConditionSatisfied: conditions.lighting,
),
ScanCondition(
scanConditionName: "Distance",
isConditionSatisfied: conditions.distance,
),
ScanCondition(
scanConditionName: "Centered",
isConditionSatisfied: conditions.centered,
),
ScanCondition(
scanConditionName: "Movement",
isConditionSatisfied: conditions.movement,
),
ScanCondition(
scanConditionName: "FrameRate",
isConditionSatisfied: conditions.frameRate,
),
ScanCondition(
scanConditionName: "Server Ready",
isConditionSatisfied: conditions.serverReady,
),
],
Expanded(
child: Column(
children: [
ScanCondition(
scanConditionName: "Movement",
isConditionSatisfied: conditions.movement,
),
ScanCondition(
scanConditionName: "FrameRate",
isConditionSatisfied: conditions.frameRate,
),
ScanCondition(
scanConditionName: "Server Ready",
isConditionSatisfied: conditions.serverReady,
),
],
),
),
),
],
],
),
),
)),
],
),
),
),
);
}

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:flutter/material.dart';
class StartButton extends StatelessWidget {
@ -13,21 +14,21 @@ class StartButton extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 50),
alignment: Alignment.bottomRight,
child: Padding(
padding: const EdgeInsets.only(right: 16.0, bottom: 32),
child: ElevatedButton(
onPressed: (disabled) ? () {} : onPressed,
style: ElevatedButton.styleFrom(
fixedSize: const Size(100, 100),
fixedSize: const Size(100, 70),
shape: const CircleBorder(),
backgroundColor: (disabled) ? Colors.grey : Colors.orangeAccent,
backgroundColor: (disabled) ? Colors.grey : CustomColors.accentColor,
elevation: 8,
),
child: const Text(
"START",
style: TextStyle(
fontSize: 16,
fontSize: 14,
),
),
),

@ -1,8 +1,15 @@
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/vital_signs/data/vitals_benchmark.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
class VitalSignWidget extends StatelessWidget {
final String vitalSignName;
final String vitalSignValue;
final String vectorUrl;
final RangeConditionWithTitle condition;
final Color? textColor;
const VitalSignWidget({
@ -10,32 +17,199 @@ class VitalSignWidget extends StatelessWidget {
required this.vitalSignName,
required this.vitalSignValue,
this.textColor,
required this.condition,
required this.vectorUrl,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 2),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
vitalSignName,
style: TextStyle(
fontSize: 14,
color: textColor ?? Colors.white,
),
),
Text(
vitalSignValue,
style: TextStyle(
fontSize: 14,
color: textColor ?? Colors.white,
fontWeight: FontWeight.bold,
),
return Card(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
color: Colors.white,
elevation: 2,
shadowColor: CustomColors.lightGreyColor,
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
SvgPicture.asset(vectorUrl, width: 36.0, height: 36.0),
SizedBox(
width: 16,
),
Text(
vitalSignName,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w600,
color: textColor ?? Colors.white,
),
),
],
),
SizedBox(
height: 8,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"$vitalSignValue ${condition.unit}",
style: TextStyle(
fontSize: 14,
color: textColor ?? Colors.white,
fontWeight: FontWeight.w500,
),
),
SizedBox(
width: 8,
),
Status(
status:
"${TranslationBase.of(context).getValue(condition.current?.quantitativeInterpretation ?? '')}")
// Text(
// "${TranslationBase.of(context).getValue(condition.current?.quantitativeInterpretation ?? '')}",
// style: TextStyle(
// fontSize: 14,
// color: textColor ?? Colors.white,
// fontWeight: FontWeight.w500,
// ),
// ),
],
),
SizedBox(
height: 8,
),
SizedBox(
height: 32,
child: Row(mainAxisSize: MainAxisSize.max, children: [
Expanded(
flex: 1,
child: ListView.separated(
separatorBuilder: (_, __) => SizedBox(
width: 8,
),
scrollDirection: Axis.horizontal,
shrinkWrap: true,
itemCount: condition.condition?.length ?? 0,
itemBuilder: (_, index) => RangeWidget(
title: condition.condition?[index].title ?? 'test',
isSelected: condition.condition?[index]
.isInRange(vitalSignValue) ==
true,
),
),
),
]),
),
SizedBox(
height: 8,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// TranslationBase.of(context).getValue(
// condition.condition?.first.interpretation ?? ''),
// style: TextStyle(
// fontSize: 14,
// color: textColor ?? Colors.white,
// fontWeight: FontWeight.w500,
// ),
// ),
// Text(
// TranslationBase.of(context).getValue(
// condition.condition?.last.interpretation ?? ''),
// style: TextStyle(
// fontSize: 14,
// color: textColor ?? Colors.white,
// fontWeight: FontWeight.w500,
// ),
// ),
// ],
// ),
// SizedBox(
// height: 8,
// ),
]),
),
);
}
}
class RangeWidget extends StatelessWidget {
final String title;
final bool isSelected;
const RangeWidget({super.key, required this.title, required this.isSelected});
@override
Widget build(BuildContext context) {
return SizedBox(
height: 23,
child: Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3),
),
// color: Color(0xFF359846),
color: (isSelected)
? CustomColors.accentColor
: CustomColors.lightGreyColor,
child: Padding(
padding: EdgeInsets.all(8),
child: Text(
title,
textAlign: TextAlign.center,
style:
TextStyle(color: (isSelected) ? Colors.white : Colors.black),
),
],
),
),
);
}
}
class Status extends StatelessWidget {
final String status;
const Status({super.key, required this.status});
@override
Widget build(BuildContext context) {
return Material(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(3),
),
// color: Color(0xFF359846),
color: (status.toLowerCase() == 'good' ||
status.toLowerCase() == 'excellent' ||
status.toLowerCase() == 'normal')
? Color(0xFFD8E8DB)
: (status.toLowerCase() == 'poor' || status.toLowerCase() == 'low')
? Color(0xFFD3D37E)
: Color(0x98d02127),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 6),
child: Text(status,
style: TextStyle(
color: (status.toLowerCase() == 'good' ||
status.toLowerCase() == 'excellent' ||
status.toLowerCase() == 'normal')
? Color(0xFF359846)
: (status.toLowerCase() == 'poor' ||
status.toLowerCase() == 'low')
? Colors.white
: Colors.white,
fontSize: 8,
fontWeight: FontWeight.w600,
)),
));
}
}

@ -0,0 +1,354 @@
var vital = {
"HR": {
"unit": "bpm",
"values": [
{
"min": 0,
"max": 60,
"interpretation": "atRisk",
"quantitativeInterpretation": "low",
"title": "< 60"
},
{
"min": 80,
"max": 100,
"interpretation": "poor",
"quantitativeInterpretation": "normal",
"title": "80-100"
},
{
"min": 60,
"max": 80,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "60-80"
},
{
"min": 100,
"max": 0,
"interpretation": "atRisk",
"quantitativeInterpretation": "high",
"title": "≥ 100"
},
]
},"hrvv": {
"unit": "bpm",
"values":[
{
"min": 0,
"max": 10.8,
"interpretation": "atRisk",
"quantitativeInterpretation": "low",
"title": "< 10.8"
},
{
"min": 10.8,
"max": 16.4,
"interpretation": "poor",
"quantitativeInterpretation": "low",
"title": "10.8-16.4"
},
{
"min": 16.4,
"max": 35.0,
"interpretation": "poor",
"quantitativeInterpretation": "low",
"title": "16.4-35.0"
},
{
"min": 35.0,
"max": 51.5,
"interpretation": "good",
"quantitativeInterpretation": "normal",
"title": "35.0-51.5"
},
{
"min": 51.5,
"max": 0,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "≥ 51.5"
}
]
},
"Sp02": {
"unit": "%",
"values": [
{
"min": 0,
"max": 90,
"interpretation": "atRisk",
"quantitativeInterpretation": "low",
"title": "≥ 90"
},
{
"min": 90,
"max": 95,
"interpretation": "poor",
"quantitativeInterpretation": "possiblyLow",
"title": "90-95"
},
{
"min": 95,
"max": 97,
"interpretation": "good",
"quantitativeInterpretation": "normal",
"title": "95-97"
},
{
"min": 97,
"max": 100,
"interpretation": "good",
"quantitativeInterpretation": "normal",
"isMaxIncluded": true,
"title": "97-100"
}
]
},
"blood_pressure": {
"unit": "mmHg",
"values": [
{
"min": 0,
"max": (90 / 60),
"interpretation": "atRisk",
"quantitativeInterpretation": "low",
"title": "< 90/60"
},
{
"min": (90 / 60),
"max": (120 / 70),
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "90/60 - 120/70"
},
{
"min": (120 / 70),
"max": (130 / 80),
"interpretation": "good",
"quantitativeInterpretation": "normal",
"title": "120/70 - 130/80"
},
{
"min": (130 / 80),
"max": (140 / 90),
"interpretation": "poor",
"quantitativeInterpretation": "slightlyHigh",
"title": "130/80-140/90"
},
{
"min": (140 / 90),
"max": 0,
"interpretation": "atRisk",
"quantitativeInterpretation": "high",
"title": "≥ 140/90"
}
]
},
"bmi": {
"unit": "",
"values": [
{
"min": 0,
"max": 18.5,
"interpretation": "poor",
"quantitativeInterpretation": "normal",
"title": "< 18.5"
},
{
"min": 18.5,
"max": 25,
"interpretation": "poor",
"quantitativeInterpretation": "normal",
"title": "25-30"
},{
"min": 25,
"max": 30,
"interpretation": "poor",
"quantitativeInterpretation": "normal",
"title": "25-30"
},
{
"min": 30,
"max": 40,
"interpretation": "atRisk",
"quantitativeInterpretation": "high",
"title": "30-40"
},
{
"min": 40,
"max": 0,
"interpretation": "atRisk",
"quantitativeInterpretation": "high",
"title": "≥40"
},
]
},
"respiratoryRate": {
"unit": "bpm",
"values": [
{
"min": 0,
"max": 12,
"interpretation": "poor",
"quantitativeInterpretation": "low",
"title": "< 12"
},
{
"min": 12,
"max": 20,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "25-30"
},
{
"min": 20,
"max": 0,
"interpretation": "poor",
"quantitativeInterpretation": "high",
"title": "≥ 20"
},
]
},
"cvd": {
"unit": "%",
"values": [
{
"min": 0,
"max": 1,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "< 1"
},
{
"min": 1,
"max": 10,
"interpretation": "Average",
"quantitativeInterpretation": "slightlyHigh",
"title": "1-10"
},
{
"min": 10,
"max": 20,
"interpretation": "poor",
"quantitativeInterpretation": "moderatelyHigh",
"title": "10-20"
},
{
"min": 20,
"max": 0,
"interpretation": "atRisk",
"quantitativeInterpretation": " high",
"title": "≥ 20"
},
]
},
"generalWellness": {
"unit": "",
"values": [
{
"min": 0,
"max": 40,
"interpretation": "poor",
"quantitativeInterpretation": "low",
"title": "< 40"
},
{
"min": 40,
"max": 80,
"interpretation": "good",
"quantitativeInterpretation": "normal",
"title": "40-80"
},
{
"min": 80,
"max": 100,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "80-100",
"isMaxIncluded": true
},
]
},
"stressLevel": {
"unit": "",
"values": [
{
"min": 0,
"max": 2,
"interpretation": "excellent",
"quantitativeInterpretation": "normal",
"title": "0-2"
},
{
"min": 2,
"max": 3,
"interpretation": "good",
"quantitativeInterpretation": "normal",
"title": "2-3"
},
{
"min": 3,
"max": 0,
"interpretation": "poor",
"quantitativeInterpretation": "high",
"title": "80-100",
},
]
},
};
class RangeConditionWithTitle {
String? unit;
List<RangeCondition>? condition;
RangeCondition? current;
RangeConditionWithTitle({this.unit, this.condition});
RangeConditionWithTitle.fromJson(Map<String, dynamic> json, String formatValueToTwoDp) {
this.unit = json['unit'];
var conditions = json['values'] as List?;
this.condition =
conditions?.map((item) => RangeCondition.fromJson(item,formatValueToTwoDp)).toList();
print("the value is $formatValueToTwoDp");
current = condition?.where((element)=>element.isSelected == true).first;
}
}
class RangeCondition {
double? min;
double? max;
bool? isMaxIncluded;
String? interpretation;
String? quantitativeInterpretation;
String? title;
bool? isSelected;
RangeCondition(this.min, this.max, this.interpretation,
this.quantitativeInterpretation, this.isMaxIncluded);
RangeCondition.fromJson(Map<String, dynamic> json, String selectedValue) {
min = json['min'].toDouble();
max = json['max'].toDouble();
interpretation = json['interpretation'];
quantitativeInterpretation = json['quantitativeInterpretation'];
isMaxIncluded = json['isMaxIncluded'];
title = json['title'];
isSelected = isInRange(selectedValue);
}
bool isInRange(String data) {
double value = 0.0;
if(data.contains('/')){
value = double.parse(data.split("/")[0])/double.parse(data.split("/")[1]);
}else{
value = double.parse(data);
}
if (max == 0 && min != 0) return value >= min!;
if (min == 0 && max != 0) return value < max!;
if (isMaxIncluded == true) return value >= min! && value <= max!;
return value >= min! && value < max!;
}
}

@ -1,3 +1,6 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/vital_signs/data/vitals_benchmark.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:vital_sign_camera/vital_sign_camera.dart';
@ -28,237 +31,288 @@ class ResultScreen extends StatelessWidget {
final deviceSize = MediaQuery.of(context).size;
const textColor = Color.fromARGB(255, 0, 0, 0);
return Scaffold(
appBar: AppBar(
title: const Text('Result'),
),
body: SingleChildScrollView(
child: Center(
child: SizedBox(
width: deviceSize.width * 0.9,
child: Container(
color: const Color.fromARGB(0, 255, 255, 255),
child: Padding(
padding: const EdgeInsets.all(15),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: const EdgeInsets.fromLTRB(0, 0, 0, 10),
child: const Text(
"Vital Signs",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
print('the age is ${healthResult?.vitalSigns?.facialSkinAge}');
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).result,
showNewAppBar: true,
showNewAppBarTitle: true,
overrideUserLogin: true,
backgroundColor: Color(0xffF8F8F8),
body: Padding(
padding: const EdgeInsets.all(15),
child: ListView(
shrinkWrap: true,
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if (_holisticAnalysis != null &&
_holisticAnalysis?.generalWellness != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Heart Rate",
vitalSignValue: formatValueToTwoDp(
textColor: textColor,
vitalSignName:
TranslationBase.of(context).generalWellness,
condition: RangeConditionWithTitle.fromJson(
vital['generalWellness']!,
formatValueToTwoDp(
healthResult?.holisticHealth?.generalWellness)),
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.generalWellness),
vectorUrl: 'assets/images/svg/wellness.svg',
),//wellness
if (_vitalSign?.stress != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: TranslationBase.of(context).stress,
condition: RangeConditionWithTitle.fromJson(
vital['stressLevel']!,
formatValueToTwoDp(
healthResult?.vitalSigns.stress)),
vitalSignValue:
formatValueToTwoDp(healthResult?.vitalSigns.stress),
vectorUrl: 'assets/images/svg/stress.svg',
),
VitalSignWidget(
textColor: textColor,
vitalSignName: TranslationBase.of(context).pulseTitle,
condition: RangeConditionWithTitle.fromJson(
vital['HR']!,
formatValueToTwoDp(
healthResult?.vitalSigns.heartRate)),
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.heartRate),
vectorUrl: 'assets/images/svg/heartrate.svg',
),
//heart rate
if (_vitalSign?.bloodPressure != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Blood Pressure",
condition: RangeConditionWithTitle.fromJson(
vital['blood_pressure']!,
healthResult?.vitalSigns.bloodPressure ?? ""),
vitalSignValue:
healthResult?.vitalSigns.bloodPressure ?? "",
vectorUrl: 'assets/images/svg/bloodpressure.svg',
),
if (_vitalSign?.hrvSdnn != null)
VitalSignWidget(
vectorUrl: 'assets/images/svg/heartrate.svg',
textColor: textColor,
vitalSignName: "SPO2",
vitalSignName: "HRV SDNN",
condition: RangeConditionWithTitle.fromJson(
vital['hrvv']!,
formatValueToTwoDp(
healthResult?.vitalSigns.hrvSdnn)),
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.spo2)),
healthResult?.vitalSigns.hrvSdnn)),
//oxygen
VitalSignWidget(
textColor: textColor,
vitalSignName:
TranslationBase.of(context).oxygenSaturation,
condition: RangeConditionWithTitle.fromJson(
vital['Sp02']!,
formatValueToTwoDp(healthResult?.vitalSigns.spo2)),
vitalSignValue:
formatValueToTwoDp(healthResult?.vitalSigns.spo2),
vectorUrl: 'assets/images/svg/oxygen.svg',
),
if (_vitalSign?.respiratoryRate != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "IBI",
vitalSignValue:
formatValueToTwoDp(healthResult?.vitalSigns.ibi)),
if (_vitalSign?.stress != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Stress",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.stress)),
if (_vitalSign?.respiratoryRate != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Respiratory Rate",
vitalSignValue: formatValueToTwoDp(
textColor: textColor,
vitalSignName:
TranslationBase.of(context).respiratoryRate,
condition: RangeConditionWithTitle.fromJson(
vital['respiratoryRate']!,
formatValueToTwoDp(
healthResult?.vitalSigns.respiratoryRate)),
if (_vitalSign?.hrvRmssd != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "HRV RMSSD",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.hrvRmssd)),
if (_vitalSign?.hrvSdnn != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "HRV SDNN",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.hrvSdnn)),
if (_vitalSign?.temperature != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Temperature",
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.temperature)),
if (_vitalSign?.bloodPressure != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Blood Pressure",
vitalSignValue:
healthResult?.vitalSigns.bloodPressure ?? ""),
if (_vitalSign?.bloodPressureSystolic != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Blood Pressure Systolic",
vitalSignValue: formatValueToTwoDp(healthResult
?.vitalSigns.bloodPressureSystolic)),
if (_vitalSign?.bloodPressureDiastolic != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Blood Pressure Diastolic",
vitalSignValue: formatValueToTwoDp(healthResult
?.vitalSigns.bloodPressureDiastolic)),
if (_holisticAnalysis != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Holistic Analysis",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_holisticAnalysis != null &&
_holisticAnalysis?.bmi != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "BMI",
vitalSignValue: formatValueToTwoDp(
vitalSignValue: formatValueToTwoDp(
healthResult?.vitalSigns.respiratoryRate),
vectorUrl: 'assets/images/svg/breathing.svg',
),
if (_holisticAnalysis != null &&
_holisticAnalysis?.bmi != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: TranslationBase.of(context).BMI,
condition: RangeConditionWithTitle.fromJson(
vital['bmi']!,
formatValueToTwoDp(
healthResult?.holisticHealth?.bmi)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.generalWellness != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "General Wellness",
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.generalWellness)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.absi != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "ABSI",
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.absi)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.cardiacWorkload != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Cardiac Workload",
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.cardiacWorkload)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.pulseRespiratoryQuotient != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Pulse Respiratory Quotient",
vitalSignValue: formatValueToTwoDp(healthResult
?.holisticHealth?.pulseRespiratoryQuotient)),
if (_holisticAnalysis != null &&
_holisticAnalysis?.waistToHeightRatio != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Waist to Height Ratio",
vitalSignValue: formatValueToTwoDp(healthResult
?.holisticHealth?.waistToHeightRatio)),
if (_cardiovascularRisks != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Cardiovascular Risks",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_cardiovascularRisks != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "General",
vitalSignValue: formatValueToTwoDp(healthResult
?.risks?.cardiovascularRisks?.generalRisk)),
if (_cardiovascularRisks != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Congestive Heart Failure",
vitalSignValue: formatValueToTwoDp(healthResult
?.risks
?.cardiovascularRisks
?.congestiveHeartFailure)),
if (_cardiovascularRisks != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Coronary Heart Disease",
vitalSignValue: formatValueToTwoDp(healthResult
?.risks
?.cardiovascularRisks
?.coronaryHeartDisease)),
if (_cardiovascularRisks != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Intermittent Claudication",
vitalSignValue: formatValueToTwoDp(healthResult
?.risks
?.cardiovascularRisks
?.intermittentClaudication)),
if (_cardiovascularRisks != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Stroke",
vitalSignValue: formatValueToTwoDp(healthResult
?.risks?.cardiovascularRisks?.stroke)),
if (_covidRisk != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Covid Risks",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_covidRisk != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Risk",
vitalSignValue: formatValueToTwoDp(
healthResult?.risks?.covidRisk?.covidRisk)),
if (_scanParameters != null)
Container(
margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
child: const Text(
"Scan Parameters",
style: TextStyle(
fontSize: 15,
color: Colors.amber,
fontWeight: FontWeight.bold,
),
),
),
if (_scanParameters != null)
VitalSignWidget(
textColor: textColor,
vitalSignName: "Signal Quality",
vitalSignValue: formatValueToTwoDp(
healthResult?.scanParameters?.signalQuality)),
]),
),
vitalSignValue: formatValueToTwoDp(
healthResult?.holisticHealth?.bmi),
vectorUrl: 'assets/images/svg/bmi.svg',
),
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "IBI",
// condition: RangeConditionWithTitle.fromJson(vital['HR']!),
// vitalSignValue:
// formatValueToTwoDp(healthResult?.vitalSigns.ibi)),
// if (_vitalSign?.hrvRmssd != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "HRV RMSSD",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.hrvRmssd)),
// if (_vitalSign?.temperature != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Temperature",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.vitalSigns.temperature)),
// if (_vitalSign?.bloodPressureSystolic != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Blood Pressure Systolic",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.vitalSigns.bloodPressureSystolic)),
// if (_vitalSign?.bloodPressureDiastolic != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Blood Pressure Diastolic",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.vitalSigns.bloodPressureDiastolic)),
// if (_holisticAnalysis != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Holistic Analysis",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.absi != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "ABSI",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.holisticHealth?.absi)),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.cardiacWorkload != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Cardiac Workload",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.holisticHealth?.cardiacWorkload)),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.pulseRespiratoryQuotient != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Pulse Respiratory Quotient",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.holisticHealth?.pulseRespiratoryQuotient)),
// if (_holisticAnalysis != null &&
// _holisticAnalysis?.waistToHeightRatio != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Waist to Height Ratio",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.holisticHealth?.waistToHeightRatio)),
// if (_cardiovascularRisks != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Cardiovascular Risks",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: TranslationBase.of(context).cvd,
// condition: RangeConditionWithTitle.fromJson(vital['cvd']!, formatValueToTwoDp(healthResult
// ?.risks?.cardiovascularRisks?.generalRisk)),
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.risks?.cardiovascularRisks?.generalRisk),
// vectorUrl: 'assets/images/svg/heartrate.svg',),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Congestive Heart Failure",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.risks
// ?.cardiovascularRisks
// ?.congestiveHeartFailure)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Coronary Heart Disease",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.risks
// ?.cardiovascularRisks
// ?.coronaryHeartDisease)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Intermittent Claudication",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.risks
// ?.cardiovascularRisks
// ?.intermittentClaudication)),
// if (_cardiovascularRisks != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Stroke",
// vitalSignValue: formatValueToTwoDp(healthResult
// ?.risks?.cardiovascularRisks?.stroke)),
// if (_covidRisk != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Covid Risks",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_covidRisk != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Risk",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.risks?.covidRisk?.covidRisk)),
// if (_scanParameters != null)
// Container(
// margin: const EdgeInsets.fromLTRB(0, 25, 0, 10),
// child: const Text(
// "Scan Parameters",
// style: TextStyle(
// fontSize: 15,
// color: Colors.amber,
// fontWeight: FontWeight.bold,
// ),
// ),
// ),
// if (_scanParameters != null)
// VitalSignWidget(
// textColor: textColor,
// vitalSignName: "Signal Quality",
// vitalSignValue: formatValueToTwoDp(
// healthResult?.scanParameters?.signalQuality)),
]),
),
),
],
),
),
);

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:vital_sign_camera/vital_sign_camera.dart';
// import 'package:wakelock/wakelock.dart';
import '../uitl/translations_delegate_base.dart';
import 'components/bounding_box_widget.dart';
import 'components/error.dart';
import 'components/scan_condition_checklist.dart';
@ -95,83 +97,133 @@ class _VitalSignsState extends State<VitalSigns> with RouteAware {
@override
Widget build(BuildContext context) {
final deviceSize = MediaQuery.of(context).size;
return Scaffold(
body: Stack(
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).scanning,
showNewAppBar: true,
showNewAppBarTitle: true,
overrideUserLogin: true,
backgroundColor: Color(0xffF8F8F8),
body: Column(
children: [
VitalSignCamera(
onCreated: _onVitalSignCameraCreated,
isActive: isCameraActive,
userInfo: userInfo,
config: config,
device: cameraDevice,
onVideoFrameProcessed: _onVideoFrameProcessed),
// A back button to navigate back to previous screen
if (_scanningStage == GetHealthStage.idle && !startedScanning)
BackHomeButton(
onPressed: () {
setState(() {
isCameraActive = false;
});
Navigator.pop(context);
},
deviceSize: deviceSize),
// A button to toggle isCameraActive
if (_scanningStage == GetHealthStage.idle && !startedScanning)
Button(
onPressed: () {
setState(() {
isCameraActive = !isCameraActive;
});
},
deviceSize: deviceSize,
title: "Toggle isCameraActive",
alignment: Alignment.topRight,
margin: EdgeInsets.fromLTRB(
0, deviceSize.height * 0.05, deviceSize.width * 0.05, 0)),
if (!isCameraActive)
const Center(
child: Text(
"Camera is not active.",
textAlign: TextAlign.center,
))
else
Stack(children: [
if (_scanningStage == GetHealthStage.idle &&
isCameraActive) // show start button only when it is not scanning
StartButton(
onPressed: () {
setState(() {
_vitalSignCameraController.startScanning();
startedScanning = true;
_healthResult = null;
_showedHealthResult = false;
});
},
disabled: !isAllConditionsMet,
if (_conditions != null)
ScanConditionChecklist(
deviceSize: deviceSize, conditions: _conditions!),
Expanded(
child: Stack(
children: [
VitalSignCamera(
onCreated: _onVitalSignCameraCreated,
isActive: isCameraActive,
userInfo: userInfo,
config: config,
device: cameraDevice,
onVideoFrameProcessed: _onVideoFrameProcessed),
Positioned.fill(
child: CustomPaint(
painter: OvalOverlayPainter(),
),
),
if (_conditions != null &&
_scanningStage == GetHealthStage.idle &&
!startedScanning) // show scan conditions checking only when it is not scanning or showing health result
ScanConditionChecklist(
deviceSize: deviceSize, conditions: _conditions!),
if (_scanningStage !=
GetHealthStage
.idle) // show remaining time count down during scan
ScanStatus(
stage: _scanningStage, remainingTime: _remainingTime),
if (!startedScanning ||
_healthResult ==
null) // show bounding box before and during scan, but not when health result is shown
BoundingBoxWidget(
deviceSize: deviceSize,
facebox: _normalizedFaceBox,
videoFrameInfo: _videoFrameInfo),
if (_error != null) Error(error: _error, errorCode: _errorCode),
])
if (_scanningStage !=
GetHealthStage
.idle) // show remaining time count down during scan
ScanStatus(
stage: _scanningStage, remainingTime: _remainingTime),
if (_scanningStage == GetHealthStage.idle &&
isCameraActive) // show start button only when it is not scanning
StartButton(
onPressed: () {
setState(() {
_vitalSignCameraController.startScanning();
startedScanning = true;
_healthResult = null;
_showedHealthResult = false;
});
},
disabled: !isAllConditionsMet,
),
],
),
),
],
),
);
// return Scaffold(
// body: Stack(
// children: [
// VitalSignCamera(
// onCreated: _onVitalSignCameraCreated,
// isActive: isCameraActive,
// userInfo: userInfo,
// config: config,
// device: cameraDevice,
// onVideoFrameProcessed: _onVideoFrameProcessed),
// // A back button to navigate back to previous screen
// if (_scanningStage == GetHealthStage.idle && !startedScanning)
// BackHomeButton(
// onPressed: () {
// setState(() {
// isCameraActive = false;
// });
// Navigator.pop(context);
// },
// deviceSize: deviceSize),
// // A button to toggle isCameraActive
// if (_scanningStage == GetHealthStage.idle && !startedScanning)
// Button(
// onPressed: () {
// setState(() {
// isCameraActive = !isCameraActive;
// });
// },
// deviceSize: deviceSize,
// title: "Toggle isCameraActive",
// alignment: Alignment.topRight,
// margin: EdgeInsets.fromLTRB(
// 0, deviceSize.height * 0.05, deviceSize.width * 0.05, 0)),
// if (!isCameraActive)
// const Center(
// child: Text(
// "Camera is not active.",
// textAlign: TextAlign.center,
// ))
// else
// Stack(children: [
// if (_scanningStage == GetHealthStage.idle &&
// isCameraActive) // show start button only when it is not scanning
// StartButton(
// onPressed: () {
// setState(() {
// _vitalSignCameraController.startScanning();
// startedScanning = true;
// _healthResult = null;
// _showedHealthResult = false;
// });
// },
// disabled: !isAllConditionsMet,
// ),
// if (_conditions != null &&
// _scanningStage == GetHealthStage.idle &&
// !startedScanning) // show scan conditions checking only when it is not scanning or showing health result
// ScanConditionChecklist(
// deviceSize: deviceSize, conditions: _conditions!),
// if (_scanningStage !=
// GetHealthStage
// .idle) // show remaining time count down during scan
// ScanStatus(
// stage: _scanningStage, remainingTime: _remainingTime),
// if (!startedScanning ||
// _healthResult ==
// null) // show bounding box before and during scan, but not when health result is shown
// BoundingBoxWidget(
// deviceSize: deviceSize,
// facebox: _normalizedFaceBox,
// videoFrameInfo: _videoFrameInfo),
// if (_error != null) Error(error: _error, errorCode: _errorCode),
// ])
// ],
// ),
// );
}
void _onVideoFrameProcessed(VideoFrameProcessedEvent event) {
@ -221,8 +273,39 @@ class _VitalSignsState extends State<VitalSigns> with RouteAware {
}
}
// load default
void _onVitalSignCameraCreated(VitalSignCameraController controller) {
_vitalSignCameraController = controller;
}
}
class OvalOverlayPainter extends CustomPainter {
@override
void paint(Canvas canvas, Size size) {
final Paint overlayPaint = Paint()
..color = Colors.white.withOpacity(0.7)
..style = PaintingStyle.fill;
canvas.drawRect(
Rect.fromLTWH(0, 0, size.width, size.height),
overlayPaint,
);
final Rect ovalRect = Rect.fromCenter(
center: Offset(size.width / 2, size.height / 2),
width: size.width * 0.9,
height: size.height * 0.7,
);
final Path ovalPath = Path()..addOval(ovalRect);
canvas.clipPath(ovalPath, doAntiAlias: true);
canvas.drawRect(
Rect.fromLTWH(0, 0, size.width, size.height),
Paint()..blendMode = BlendMode.clear,
);
}
@override
bool shouldRepaint(covariant CustomPainter oldDelegate) {
return false;
}
}

@ -83,6 +83,7 @@ class AppScaffold extends StatefulWidget {
final int? currentTab;
final bool isShowPharmacyAppbar;
final Widget? customAppBar;
final bool overrideUserLogin;
AppScaffold setOnAppBarCartClick(VoidCallback onClick) {
_onCartClick = onClick;
@ -130,7 +131,8 @@ class AppScaffold extends StatefulWidget {
this.backButtonTab,
this.changeCurrentTab,
this.currentTab,
this.isShowPharmacyAppbar = false});
this.isShowPharmacyAppbar = false,
this.overrideUserLogin= false});
@override
_AppScaffoldState createState() => _AppScaffoldState();
@ -216,7 +218,7 @@ class _AppScaffoldState extends State<AppScaffold> {
AppGlobal.context = context;
PharmacyPagesViewModel pagesViewModel = Provider.of(context);
bool isUserNotLogin = (!Provider.of<ProjectViewModel>(context, listen: false).isLogin && widget.isShowDecPage);
bool isUserNotLogin = (widget.overrideUserLogin)?false:(!Provider.of<ProjectViewModel>(context, listen: false).isLogin && widget.isShowDecPage);
return Scaffold(
backgroundColor: widget.backgroundColor ?? CustomColors.appBackgroudGrey2Color,

Loading…
Cancel
Save