← Back to team overview

dhis2-devs team mailing list archive

Re: Greetings + new DHIS patient module

 

Hi Viet,

Thanks for the update. But a little afraid that you are making it very much
hard coded to the requirements of India.

Any change you are making is fine with me as long as it makes sense to
broader use cases. The ID for example is better if we could keep it as it
was before. I remember the ID was made of organization unit code or short
name plus a 5 (or 6??) digit number. It was made like this on the assumption
that each registering unit will be a facility to serve a population of
hundred thousand and remember that our assumption is this system is going to
be used by the lowest possible health administrative units (at least as far
as registration is concerned). And whenever a migration occurs we have to
update the person's ID. We should only keep the UUID unique, unchanged and
one-to-one. So the patient ID should be somewhat floating --- it could also
be possible for a person to have more than one identifier.

Calculating birth date from a given age -  yes you will have conflicts if
all ages are calculated relative to the first of January (that is how it is
currently). But then your new approach makes sense if everyone if telling
age relative to the current date.

And the relationship type - instead of assuming there will always be
parent/guardian vs child relationship, why don't you provide users with the
list of available relationships so that they can choose ?

Thank you
Abyot.

On Wed, Mar 3, 2010 at 1:20 PM, Viet Nguyen <phamquocviet@xxxxxxxxx> wrote:

>
> Hi,
>
> Just a quick update about Patient registration form functionality :
>
> ** Check duplicate : *
>
> This function allow user to check for existing patient base on : name ,
> birthdate, age, gender
>
> If there is duplicate patient, a pop up will be showed, with the list of
> all the duplicated patients.
>
> From this pop up, user can have two options :
>
>
>    1. Continue create the current patient. So there will be two patients
>    with the same information like above. But their  identifiers must be
>    different which will be checked later.
>    2. User can choose a patient from the list duplicated patient to update
>    information for him, by click on the button "Update this patient" that
>    follow by each patient in the list. User will then be redirected to the
>    Update Patient page.
>
> ** Under age patient* :
>
> Under age patient can be understand as a child. The purpose of this field
> is not to hard code the age to define a child, like  age < 5  or age < 15.
>
> In the registration form, there is a check box named " Is Underage" .  User
> check on this check box to identify the patient is a child.  A pop up will
> be showed after clicking.
>
> The purpose of this pop up is :  user must choose a representative for this
> child.  Because , some  identifiers that are mandatory ( can be defined in
> Patient Identifier Type management page ) . But a child can not have those
> identifier, so we have to inherit those identifier from the child's
> representative.
>
> Not all identifier can be inherited, you can defined a PatientIdentiferType
> is able to inherit or not when creating it.  The field name is  "Related"
> ... ( God ...why didn't I use" Inheritable" .... ) .
>
> If a PatientIdentifierType with "related" = FALSE and "mandatory" = TRUE
> then user must enter value for it.
>
> Ok, back to the popup, there are two tabs :
>
>    1. Search existing person : user can search for an existing patient in
>    system to be the representative of the child.
>    2. Add new person : said this is person, because this is not really a
>    patient, this person is just giving identifier...not enrolling to any
>    program, at least at this step. Of course the record is also saved to the
>    patient table. The form just only include basic information ( name ,
>    birthdate, gender.. ) and Identifiers.  No attributes is needed. Of course
>    user can update attributes for this person later by the Update Patient page.
>
> One problem in this function that I can not have enough time to do :
>
> In the combo box Relationship Type, there should be Parent and Guardian, I
> hard coded this. You should create two relationship type  with this
> information before testing this function :
>
>    A is to B : Guardian, B is to A : Child
>    A is to B : Parent , B is to A : Child.
>
> The list of relationship type should be get from the Relationship type
> table. But if we put everything to the combo box, then user may choose
> Husband, Wife, or even child...which is so wrong.
>
> My plan is creating an object RelationshipGroup, which should be based on
> the age...
>
> Anyway, because we are late for releasing this version in India. so hard
> code for now is the only solution. I will continue working on this, so
> ...please don't worry...
>
> ** System generated identifier :*
>
> I looked at the id_gen module from OpenMRS. Well , they have a whole module
> for this which has many functionality for manage system auto generated
> identifier.
>
> I can not have enough time for getting all of that. So what I did is just
> get a piece of code that is used for generate a check digit for the ID.
>
> The format that Indian team chose is :
> [BirthDate][Gender][XXXXXX][checkdigit]
>
> BirthDate : yyyyMMdd
> Gender : Male  = 1 ; Female = 0
> XXXXXX : a random number  with length = 6   ( 0 - 999999 )
> checkdigit :  generated using Luhn Algorithm ( thanks to OpenMRS guys )
>
> I also changed the way that Abyot generate the birthdate from age ( when
> user only enter age ) .
> It is :    todayCalendar.add( Calendar.YEAR, -1 * age );
> What Abyot did is
>           todayCalendar.set( Calendar.DATE, 1 );
>           todayCalendar.set( Calendar.MONTH, Calendar.JANUARY );
>           todayCalendar.add( Calendar.YEAR, -1 * age );
> Because we generate the id base on birthdate , get current date should be
> better.
> Hope this is ok for Abyot....
>
> Each country will have different formats...so I think for current we just
> can change code when implementing in the country. Building a module for this
> would take time....
>
> Finally,  but almost those things only follow India 's requirements.
> Please give comment then we can try to make it more generic...
>
> Regards,
>
> Viet Nguyen
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
> More help   : https://help.launchpad.net/ListHelp
>
>

References