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

Expanding medical history [ Comorbidities ] #7852

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

AshrafMd-1
Copy link
Contributor

@AshrafMd-1 AshrafMd-1 commented May 17, 2024

Proposed Changes

@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

Copy link

vercel bot commented May 17, 2024

@AshrafMd-1 is attempting to deploy a commit to the Open Healthcare Network Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

netlify bot commented May 17, 2024

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit e129388
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/6661f1270c6151000888814a
😎 Deploy Preview https://deploy-preview-7852--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.

@AshrafMd-1
Copy link
Contributor Author

AshrafMd-1 commented May 17, 2024

Only changed the frontend payload. The backend is not affected

Slightly changed the type

interface medicalHistoryModel {
  id?: number;
  disease: string | number;
  details: string;
  extra_info?: object;
}

the code is

if (medData) {
        const details = formData[`medical_history_${medData.id}`];
        if (medData.id === 11) {
          medical_history.push({
            disease: medData.text,
            details: details ? details : "",
            extra_info: {
              tb_status: formData["tb_status"] ?? "",
              tb_duration: formData["tb_duration"] ?? "",
            },
          });
        } else if (medData.id === 13) {
          medical_history.push({
            disease: medData.text,
            details: details ? details : "",
            extra_info: {
              cancer_type: formData["cancer_type"] ?? "",
            },
          });
        } else {
          medical_history.push({
            disease: medData.text,
            details: details ? details : "",
          });
        }
      }

The payload it sends

[
    {
        "disease": "Diabetes",
        "details": ""
    },
    {
        "disease": "OTHER",
        "details": "Covid textdone 7"
    },
    {
        "disease": "TB",
        "details": "fvdvdf",
        "extra_info": {
            "tb_status": "Active",
            "tb_duration": "4"
        }
    },
    {
        "disease": "Cancer",
        "details": "rvrerveer",
        "extra_info": {
            "cancer_type": "Colorectal"
        }
    }
]

@AshrafMd-1
Copy link
Contributor Author

image

@AshrafMd-1
Copy link
Contributor Author

AshrafMd-1 commented May 17, 2024

@rithviknishad can you check this once
Also how do I proceed with backend if this is okay

@github-actions github-actions bot added the merge conflict pull requests with merge conflict label May 21, 2024
Copy link

👋 Hi, @AshrafMd-1,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@github-actions github-actions bot added the Deploy-Failed Deplyment is not showing preview label May 21, 2024
Copy link

netlify bot commented May 21, 2024

Deploy Preview for care-net failed.

Name Link
🔨 Latest commit 2bc087c
🔍 Latest deploy log https://app.netlify.com/sites/care-net/deploys/664ca1bdfce1ca00080a8c00

@github-actions github-actions bot removed the merge conflict pull requests with merge conflict label May 22, 2024
@AshrafMd-1 AshrafMd-1 marked this pull request as ready for review May 22, 2024 19:12
@AshrafMd-1 AshrafMd-1 requested a review from a team as a code owner May 22, 2024 19:12
@rithviknishad rithviknishad removed the Deploy-Failed Deplyment is not showing preview label May 23, 2024
src/Common/constants.tsx Outdated Show resolved Hide resolved
src/Components/Patient/PatientRegister.tsx Outdated Show resolved Hide resolved
src/Components/Patient/PatientRegister.tsx Outdated Show resolved Hide resolved
src/Components/Patient/PatientRegister.tsx Outdated Show resolved Hide resolved
src/Components/Patient/PatientRegister.tsx Outdated Show resolved Hide resolved
@AshrafMd-1
Copy link
Contributor Author

@rithviknishad can you check once

@nihal467
Copy link
Member

nihal467 commented May 28, 2024

@AshrafMd-1 add the backend test and once its done request for review

@nihal467
Copy link
Member

nihal467 commented Jun 4, 2024

@AshrafMd-1 fix the backend failure

@AshrafMd-1
Copy link
Contributor Author

@AshrafMd-1 fix the backend failure

Can you check the backend once

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.

Expanding Comorbidities: Medical History
3 participants