Attribute value "Patient Code" from his "Name" and his "Year of birth" in Individual Records [2.20]

Hi all,

In our program, we want to register the attribute patient code. Does someone know how to obtain automatic value in attribute « Patient Code » from his attribute « Name » and « Year of birth » instead of writing the value manually ?

Ex :

Name : SARAH

Year of birth : 1980

ð Patient Code : value should be “SAR80

Thanks,

Harivola

···


Avast logo

L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com

Dear Harivola,

You will need a custom form with some JQuery/Javascript that splits the name and takes the first 3 letters in the name and the last two letters in year of birth and inserts into into the patient code fields.

For that to happen, the name and year of birth should be filled first, and on focus in the patient code, you need to call the script/function.

Alex

···

On Thu, Aug 20, 2015 at 1:55 PM, Harivola RANDRIANJAFY harivolar@psi.mg wrote:

Hi all,

In our program, we want to register the attribute patient code. Does someone know how to obtain automatic value in attribute « Patient Code » from his attribute « Name » and « Year of birth » instead of writing the value manually ?

Ex :

Name : SARAH

Year of birth : 1980

ð Patient Code : value should be “SAR80

Thanks,

Harivola



Avast logo

L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET

Kampala

Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don’t want to be anything other than what I have been - one tree hill "

Dear Alex,

After customizing program form according to your advise below, attached the Source code that I write in the « design program entry form ».

Launching the Tracker Capture, the code fields doesn’t capture my fonction. Is there something wrong that i miss ?

Regards,

Harivola

source_patient_register.txt (2.09 KB)

···

De : Alex Tumwesigye [mailto:atumwesigye@gmail.com]
Envoyé : jeudi 20 août 2015 18:36
À : Harivola RANDRIANJAFY harivolar@psi.mg
Cc : DHIS 2 Users list dhis2-users@lists.launchpad.net; dhis2-devs dhis2-devs@lists.launchpad.net
Objet : Re: [Dhis2-users] Attribute value “Patient Code” from his “Name” and his “Year of birth” in Individual Records [2.20]

Dear Harivola,

You will need a custom form with some JQuery/Javascript that splits the name and takes the first 3 letters in the name and the last two letters in year of birth and inserts into into the patient code fields.

For that to happen, the name and year of birth should be filled first, and on focus in the patient code, you need to call the script/function.

Alex

On Thu, Aug 20, 2015 at 1:55 PM, Harivola RANDRIANJAFY harivolar@psi.mg wrote:

Hi all,

In our program, we want to register the attribute patient code. Does someone know how to obtain automatic value in attribute « Patient Code » from his attribute « Name » and « Year of birth » instead of writing the value manually ?

Ex :

Name : SARAH

Year of birth : 1980

ð Patient Code : value should be “SAR80

Thanks,

Harivola


Avast logo

L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com


Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET

Kampala

Uganda

IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya

IT Specialist (Servers, Networks and Security, Health Information Systems - DHIS2 ) & Solar Consultant

+256 774149 775, + 256 759 800161

"I don’t want to be anything other than what I have been - one tree hill "


Avast logo

L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com



Avast logo

L’absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
www.avast.com