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

Failed to upload patient file in External Result #7101

Closed
Sunilsubba opened this issue Jan 24, 2024 · 13 comments · Fixed by #7339
Closed

Failed to upload patient file in External Result #7101

Sunilsubba opened this issue Jan 24, 2024 · 13 comments · Fixed by #7339
Assignees

Comments

@Sunilsubba
Copy link

----Describe the bug----
Restricted to import patients. CSV file, the error comes out as "Different District".
It will only work when the User's ( State admin) District from the location is the same as the District from the Patient. CSV File

----Steps to reproduce----
1- Log in
2- Go to External Result/ import Result/
3- Click on "Sample Format" and download.
4- Click on "Choose File" and Upload that sample format
https://care.coronasafe.in/external_results/upload

----Login Credentials----
Username: state_admin123
Password: Lilo@123

----Screenshots----
IMG_20240125_002428.jpg

@SamakshAgarwal1112
Copy link

Can you please describe what should be the expected behaviour?

@SamakshAgarwal1112
Copy link

Hey, I think I get what's the problem. It won't let you save the records if there are no valid records. If that needs to be changed, I'll change it. @Sunilsubba please assign me this issue. I'll raise a PR.

@Sunilsubba
Copy link
Author

State admin should be able to upload the patient files of all the districts of that particular state. "Different District" must not come up for all the districts of the respective state.

Copy link

github-actions bot commented Feb 8, 2024

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 the stale label Feb 8, 2024
@SamakshAgarwal1112 SamakshAgarwal1112 removed their assignment Feb 22, 2024
@jainvedant392
Copy link
Contributor

Hey @rithviknishad , I'm interested to work on this issue, can I please get it assigned?

@jainvedant392
Copy link
Contributor

Hey @rithviknishad , I'm interested to work on this issue, can I please get it assigned?
I think I have to find the condition for downloading or importing the CSV file, and alter it to produce the result for any district.

@SinghYuvraj0506
Copy link
Contributor

Hey, @jainvedant392 are you working on the issue, or can I proceed with it.

@SinghYuvraj0506
Copy link
Contributor

Hey @Sunilsubba , can you tell me if I'm correct or not, If the user is a StateAdmin then it may add patients of any district in the state, whereas if it is a district admin then the patient allowed should be of same district, and the rest other cases would throw an error.

@jainvedant392
Copy link
Contributor

jainvedant392 commented Mar 1, 2024

Hey, @jainvedant392 are you working on the issue, or can I proceed with it.

Hey @SinghYuvraj0506 , actually I am working on this issue.

@jainvedant392
Copy link
Contributor

Hey @rithviknishad @Sunilsubba, I wanted once to discuss the approach of this issue.

@jainvedant392
Copy link
Contributor

So when the logged in user has a "user_type": "StateAdmin", he should be able to upload the files such that, if the user and patient in the file has same state, "Different Districts" should not be visible.

@jainvedant392
Copy link
Contributor

And if the states of both are different, then only we should set the "validationErrorCount". Right?

@jainvedant392
Copy link
Contributor

Also there is no field or property like "state" in the csvData, so I have to extract the state from the address property.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants