Change date format

28 views
Skip to first unread message

Paulo Henrique Cardoso Alves

unread,
Jan 20, 2012, 6:48:32 PM1/20/12
to sana-developers
Hi,
I have encountered problems when sending the patient's birthday, so
I'm trying to change the date format sent by the android.
After entering the date 22/07/1990, 07/10/1991 is shown in OpenMRS. I
think the OpenMRS interpret the date as MMDDYYYY and android as
DDMMYYYY, i don't know.

Can someone help me?

thnks,

Chris Arriola

unread,
Jan 20, 2012, 7:17:59 PM1/20/12
to sana-de...@googlegroups.com
Hi Paulo,

You are right. You need to change the dispatch server so that it interprets the date in the correct order. Specifically, change OPEN_MRS_DATE_FMT in settings.py from %m/%d/%y to %d/%m/%y 

Hope this helps,
Chris
--
Chris Arriola

Paulo Henrique Cardoso Alves

unread,
Jan 24, 2012, 3:41:33 PM1/24/12
to sana-developers
Hi Chris,

OPENMRS_DATE_FMT is not in settings.py.
Where else can I look to make the change?

thnks,

On 20 jan, 22:17, Chris Arriola <arriolac...@gmail.com> wrote:
> Hi Paulo,
>
> You are right. You need to change the dispatch server so that it interprets
> the date in the correct order. Specifically, change OPEN_MRS_DATE_FMT in
> settings.py from %m/%d/%y to %d/%m/%y
>
> Hope this helps,
> Chris
>
> On Fri, Jan 20, 2012 at 3:48 PM, Paulo Henrique Cardoso Alves <
>

Eric Winkler

unread,
Jan 26, 2012, 6:47:32 AM1/26/12
to sana-de...@googlegroups.com
Hi Paulo,
The OPENMRS_DATE_FMT is first available in the 1.1 release of mds. Are you using the 1.0 version?
Best,
Eric 

Paulo Henrique Cardoso Alves

unread,
Jan 26, 2012, 11:49:25 AM1/26/12
to sana-de...@googlegroups.com
Hi Eric,

I think so ..
I performed the installation of sana in September 2011.
What is better to do, upgrade to version 1.1 of MDS or make the change in version 1.0?

Thnks,

2012/1/26 Eric Winkler <winkl...@gmail.com>

Paulo Henrique Cardoso Alves

unread,
Jan 26, 2012, 1:54:47 PM1/26/12
to sana-developers
Sorry,

I think so.
I performed the installation of sana in September 2011.
What is better to do, upgrade to version 1.1 of MDS or make the change
in
version 1.0?

Thnks.

On 26 jan, 14:49, Paulo Henrique Cardoso Alves <ph.puc...@gmail.com>
wrote:
> Hi Eric,
>
> Did you mean: I think so.. I did *Santa's* *installation* in september,
> 2011.. What is the best to do? Upgrade to version 1.1 of mds, or to search
> change my actually version?
> I think so ..
> I performed the installation of sana in September 2011.
> What is better to do, upgrade to version 1.1 of MDS or make the change in
> version 1.0?
>
> Thnks,
>
> 2012/1/26 Eric Winkler <winkler...@gmail.com>

Eric Winkler

unread,
Jan 26, 2012, 10:36:01 PM1/26/12
to sana-de...@googlegroups.com
Hi Paulo,
I believe it will be easier to just upgrade to 1.1. There is one critical change to the mds data tables which is described at this link but the upgrade should otherwise be transparent to the clients.
Best,
Eric

Paulo Henrique Cardoso Alves

unread,
Feb 2, 2012, 2:18:43 PM2/2/12
to sana-developers
Hi,

I did a full install again on another server
But I'm still the issue date to enter the patients by phone.
I've done in settings.py to change the format "%d/%m/%Y", but now
sending the patient's fault. Should I make the change only in
settings.py?

Remember, the problem is a patient with inseam date 22/07/1990, for it
is the date appearing on OpenMRS 07/10/1991

Thanks,

On 27 jan, 01:36, Eric Winkler <winkler...@gmail.com> wrote:
> Hi Paulo,
> I believe it will be easier to just upgrade to 1.1. There is one critical
> change to the mds data tables which is described at this link<http://sana.mit.edu/wiki/index.php?title=Configuring_Sana_Dispatch_Se...> but

Paulo Henrique Cardoso Alves

unread,
Feb 16, 2012, 7:10:20 AM2/16/12
to sana-developers
Hi,

I modified the settings.py for fix the error of encounter date. I
changed for %d/%m/Y and it worked.

Now i need to change the patient's birthdate format. The problem is
the same that i was with encounter date.

How can i fix it?

Thanks,

On Feb 2, 5:18 pm, Paulo Henrique Cardoso Alves <ph.puc...@gmail.com>
wrote:

Paulo Henrique Cardoso Alves

unread,
Feb 16, 2012, 10:51:44 AM2/16/12
to sana-developers
Hi,

For change the date's format, I made changes in api.py. I changed

patient_birthdate = '%s/%s/%s' % (months_dict[patient_month],
patient_day,
patient_year)

For

patient_birthdate = '%s/%s/%s' % (patient_day,
months_dict[patient_month],
patient_year)

This resolved my problem.

Thanks,

On 16 fev, 10:10, Paulo Henrique Cardoso Alves <ph.puc...@gmail.com>
Reply all
Reply to author
Forward
0 new messages