Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnosis: Adds field Principal Diagnosis #6218

Merged
merged 8 commits into from
Sep 6, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Sep 4, 2023

WHAT

🤖 Generated by Copilot at a5fc8d2

This pull request adds a feature to capture and display the principal diagnosis of a consultation, following the ICD-11 standard. It modifies the ConsultationForm component to include a new required field, the ConsultationDetails component to show the diagnosis, and the ConsultationModel interface to store the diagnosis id.

Proposed Changes

image

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at a5fc8d2

  • Add a new component ShowDiagnosis to display the principal diagnosis of the consultation (link)
  • Import the AutocompleteFormField component to create a searchable dropdown field for selecting the principal diagnosis (link)
  • Add a new property icd11_principal_diagnosis to the FormDetails type and the ConsultationModel interface to store the id of the selected diagnosis object (link, link)
  • Initialize the icd11_principal_diagnosis property to undefined in the initForm function (link)
  • Add a new case for validating the icd11_principal_diagnosis field in the validateForm function, which requires the field to be non-empty and match one of the final or provisional diagnoses (link)
  • Add the icd11_principal_diagnosis property to the payload object that is sent to the API when updating or creating a consultation (link)
  • Reset the icd11_principal_diagnosis property to undefined when the final or provisional diagnoses arrays are changed in the form (link)
  • Add a new AutocompleteFormField component to the consultation form, with the name icd11_principal_diagnosis and the label Principal Diagnosis, using the final or provisional diagnoses arrays as the options (link)

@rithviknishad rithviknishad requested a review from a team September 4, 2023 11:18
@rithviknishad rithviknishad requested a review from a team as a code owner September 4, 2023 11:18
@vercel
Copy link

vercel bot commented Sep 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 6, 2023 1:11pm

@netlify
Copy link

netlify bot commented Sep 4, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 86db591
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64f87a44637e5400089385fd
😎 Deploy Preview https://deploy-preview-6218--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rithviknishad rithviknishad changed the title Diagnosis: Adds field Principle Diagnosis Diagnosis: Adds field Principal Diagnosis Sep 4, 2023
@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Sep 4, 2023
@nihal467
Copy link
Member

nihal467 commented Sep 5, 2023

@rithviknishad modify the consultation creation cypress test in patient_crud to have principle diagnosis as well

@nihal467
Copy link
Member

nihal467 commented Sep 6, 2023

LGTM, tested through @rithviknishad tunnel

@nihal467
Copy link
Member

nihal467 commented Sep 6, 2023

@khavinshankar only merge it, post backend and cypress pass's

@github-actions github-actions bot added cypress passed and removed cypress failed pull request with cypress test failure labels Sep 6, 2023
@khavinshankar khavinshankar merged commit 8a6e526 into develop Sep 6, 2023
27 of 29 checks passed
@khavinshankar khavinshankar deleted the consultation/principle-diagnosis branch September 6, 2023 13:57
@github-actions
Copy link

github-actions bot commented Sep 6, 2023

@rithviknishad We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

ShivamJhaa pushed a commit to ShivamJhaa/care_fe that referenced this pull request Sep 6, 2023
* adds field principle diagnosis

* show in consultation details

* fix typo

* fix cypress

* try adding wait

* fix tests
khavinshankar pushed a commit that referenced this pull request Sep 7, 2023
…6106)

* lints

* Added test for resource and migrated it to POM

* trying a fix

* nits

* backend change

* Reverted useless changes

* fix test

* Fixed failing test

* Added api verification

* Diagnosis: Adds field Principal Diagnosis (#6218)

* adds field principle diagnosis

* show in consultation details

* fix typo

* fix cypress

* try adding wait

* fix tests

* open pdf file preview in new tab (#6226)

* Changed weekly to average weekly for working hours (#6228)

* Added padding to count block on patients page

* fixed date format in asset manage page

* Merged configure facility and configure health facility in one page

* removed commented code

* changed weekly to average weekly for working hours

* Resolved comments

---------

Co-authored-by: Mohammed Nihal <57055998+nihal467@users.noreply.github.com>
Co-authored-by: Rithvik Nishad <mail@rithviknishad.dev>
Co-authored-by: Ashesh <3626859+Ashesh3@users.noreply.github.com>
Co-authored-by: Kshitij Verma <101321276+kshitijv256@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Principle Diagnosis
3 participants