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

Occupation of patient to be tracked #6945

Closed
aparnacoronasafe opened this issue Dec 29, 2023 · 16 comments · Fixed by #7152
Closed

Occupation of patient to be tracked #6945

aparnacoronasafe opened this issue Dec 29, 2023 · 16 comments · Fixed by #7152
Assignees

Comments

@aparnacoronasafe
Copy link
Member

https://care.coronasafe.in/facility/eeb23cb7-1524-479a-825e-660311386b47/patient/51ff0682-065d-4e25-bcc6-fb1b682642fb/update

Patient registration form, add a field at the bottom of the "Personal details" section for "Occupation", with dropdown with the following options:
"Student/ Businessman/ Health care worker/Health care lab worker/ animal handler/ any other"

@sagarkori143
Copy link

I would like to take this one!

@sagarkori143
Copy link

sagarkori143 commented Dec 29, 2023

@aparnacoronasafe

Should this field also be marked as mandatory?
And are these options okay and sufficient?
image

@sagarkori143
Copy link

sagarkori143 commented Dec 30, 2023

Also @rithviknishad @aparnacoronasafe @nihal467 @AshrafMd-1
I have created the required Occupation field and I inspected results in console and ensured that the occupation data is going through handleSubmit process but this data is not being saved into the database because when I again go to edit patient after submitting all the details, the occupation field there is again empty. Here is what I have done so far:

  1. Defined OCCUPATION_TYPES in Constants.tsx
    image

  2. Defined occupation modal as strings in models.tsx
    image

  3. Added occupation input field in patientRegister.tsx
    image

  4. Added to Abha linking
    image

image

  1. Added to data schema in handleSubmit:
    image

  2. Defined in fetchExtResultData in patientReg.tsx itself:
    image

Please have a look and let me know where I'm missing out which is resulting in data not being saved to database.

@rithviknishad
Copy link
Member

The backend does not have a field called "occupation" in the patient serializer.

Kindly go through the README and have a look at the Care API Docs https://careapi.ohc.network/swagger/

The occupation field is available inside the meta field of the patient serializer.

Also, this will require backend changes to be made to support the new options.

image

@rithviknishad
Copy link
Member

@aparnacoronasafe should the "any other" option be a free-flow text accepting any input from the user?

Copy link

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, @aparnacoronasafe, This issue has been automatically marked as stale because it has not had any recent activity.

@github-actions github-actions bot added stale and removed stale labels Jan 20, 2024
@konavivekramakrishna
Copy link
Contributor

@rithviknishad

can you please assigne me

@rithviknishad rithviknishad moved this from Triage to Up Next in Care Jan 30, 2024
@konavivekramakrishna
Copy link
Contributor

@rithviknishad

in patientregistration table there is no field occupation instead in patientmetainfo
table occupation is present but the options are different should i add a new field to patientregistration table or change options in patientmetainfo table
image

@konavivekramakrishna
Copy link
Contributor

@rithviknishad

image

in patientmetainfo there no records, should i add occupation field in patientregistration table ?

@rithviknishad
Copy link
Member

The meta_info field may not being used in the current version of care_fe. But the backend already has it working. We do have 21 records in meta_info table in staging.

You can just update the enum choices

image

@konavivekramakrishna
Copy link
Contributor

konavivekramakrishna commented Feb 1, 2024

@sainak

when i am trying to load dummy data, I am getting the below error can you please help me to fix this

image
image

@konavivekramakrishna
Copy link
Contributor

image

should i add video_connect_link field to each user in dummy data to fix this ?

@sainak
Copy link
Member

sainak commented Feb 1, 2024

seems like a migration is pending, can you pull the latest changes and restart the containers

@konavivekramakrishna
Copy link
Contributor

konavivekramakrishna commented Feb 1, 2024

No changes have been made, and I have restarted the containers, but It's still showing the same error

@rithviknishad
Copy link
Member

@konavivekramakrishna wait for the migrations to complete before running load_dummy_data

Same issue reported here: ohcnetwork/care#1833

@konavivekramakrishna
Copy link
Contributor

Thanks, @sainak and @rithviknishad

The issue has been fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants