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

Sync patient data from user to server #18

Closed
6 tasks done
ssrihari opened this issue May 16, 2018 · 3 comments
Closed
6 tasks done

Sync patient data from user to server #18

ssrihari opened this issue May 16, 2018 · 3 comments

Comments

@ssrihari
Copy link
Contributor

ssrihari commented May 16, 2018

  • Create patient model payload (patient, address)
  • Create patient model payload (phone numbers)
  • Schedule periodic syncing of patients
  • Send sync-pending patients to server
  • Limit the number of patients to send to the server
  • Finish unit tests

As a nurse, I want the patient records on device to be sent in batches to the backend, so that the central database is updated, and the data is safe.

Patient data model

ID - UUID [to discuss]
Full Name - String
Age when created - Integer
Date of Birth - Date
Gender (male / female / transgender) - Enum/String
Status (active, dead, migrated, unresponsive, other [define other]) - Enum/String

Address data model

id – uuid
street address - string
colony - string
village - string
district - string
state - string
country - string
pin - string

Phone number data model

number - string
type -string
active - boolean

Relationships

Patient belongs to an address
Patient has and belongs to many phone numbers

Questions:

  • What is the "other" patient status?
  • What should the status be when a patient is "Removed from call list"?

Not relevant for MVP. We'll still keep the status field in the code. We'll default to "active" status. @saket please default to "active" status on the device as well.

  • Should we perform any validation on the mobile number?

No, as discussed with Daniel. To allow landlines, extensions, etc.

  • Should village/colony be the same field? Should they be mandatory?

Yes, single field. Not mandatory. As discussed with Tim/Daniel at standup on 17/05.

Re: address model

  1. Locality: as entered by nurses on the app. How would we model this?
  2. Aadhar address: what are the fields? How would this fit into our model?
@saket
Copy link
Contributor

saket commented May 16, 2018

Not relevant for MVP. We'll still keep the status field in the code. We'll default to "active" status. @saket please default to "active" status on the device as well.

Got it.

@ssrihari
Copy link
Contributor Author

Is the patient <=> phone_number relationship many-to-many? In that case, are we sure we want to update other patients' phone numbers when one patient's shared phone number is updated?

If not, it's a one-to-many relationship.

@timcheadle @saket @govindkrjoshi

@ssrihari
Copy link
Contributor Author

We need to store age, and age_updated_at, to compute the current age.

@deobald deobald unassigned pratul and saket Jul 2, 2018
@timcheadle timcheadle removed this from Dev+QA Complete in RedApp Jul 10, 2018
@saket saket closed this as completed Nov 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants