← Back to team overview

dhis2-devs team mailing list archive

Re: Should add one more property in patient attribute Object

 

Breaking the address into different sub-addresses gives more sense than
having one long address. That is how address is approached in the system -
things like housenumber, street address, province, landmark and the like can
provide detail description of the person address/location.

What do you think Tri? Do you think the above approach is not appropriate
for your context? Is it possible to break the address, from your case, into
smaller parameters?



2009/12/2 Bob Jolliffe <bobjolliffe@xxxxxxxxx>

> Hi Tri
>
> Sorry I have not looked at this module in detail so forgive me if I am
> misinterpreting something.  But ...
>
> It is generally a bad idea to have view related information as properties
> of the model.  Model-View-Control separation is very important.  When you
> compromise on this it almost always comes back to bite you eventually.  I
> feel PatientAttributes should as much as possible relate to attributes of
> the patient - what to display rather than how to display on a form.
>
> But I do see your problem.  What is the workaround?  I don't know off hand
> without greater familiarity with the module.  Two suggestions:
> 1.  at least for address, it is normal to break into a number of text
> fields on a form - address line1, line2, line2 etc or house, street, town
> etc.  Does it make sense to create separate attributes for these address
> parts?  How you choose these address parts mostly depends on what the
> address is used for (physical location for house visits, extra
> identification, postal delivery point etc).  And also different countries do
> use different address standards.
> 2.  here's a nifty idea for a javascript widget.  You say it becomes a
> problem for addresses >50 characters.  It is possible to have a javascript
> listener dynamically replace text field with textarea when the amount of
> text goes over a threshold - say 50.  And similarly convert textarea to text
> field when contents drop below a threshold.
>
> While 2 is interesting, I think 1 is better.  And can be implemented easily
> in patient attribute configuration.
>
> Regards
> Bob
>
> 2009/12/2 Trí Trần Thanh <tranthanhtri84@xxxxxxxxx>
>
>> Hi Lars and Abyot.
>>
>> I mean is :
>>  - Current PatientAttribute class have some property is : Name -
>> Descriptions - Value Type.
>> In my case: i am trying to create one patient attribute is address.
>> Really. The address is so long (>50 char ). If we use text field , it is
>> small and short. Really difficult to see what was text entered into.
>>  - We can add one property in PatientAttribute class. If user choose
>> Value Type is text so they can choose text filed for short text or textarea
>> for longer text.
>>
>> Thanks
>>
>> ================================
>> Tran Thanh Tri
>>  HISP Viet Nam
>>  Cell phone: +84903670967
>>  Website: http://tringuyenvn.com
>> ================================
>>
>>
>> 2009/12/2 Lars Helge Øverland <larshelge@xxxxxxxxx>
>>
>>
>>>
>>> 2009/12/2 Abyot Gizaw <abyota@xxxxxxxxx>
>>>
>>> Hi Tri,
>>>>
>>>> You want to add one more attribute called controlType?
>>>>
>>>> What are you going to store with it? Can you give me an example where
>>>> you will need controlType attribute? have you seen PatientAttribute module?
>>>>
>>>> Abyot.
>>>>
>>>>
>>> We do want to customize it for Vietnam so thanks for the feedback Tri.
>>> Please notice that, like Abyot says, the PatientAttribute functionality lets
>>> you define any attribute/property you like for a Patient.
>>>
>>> Lars
>>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>
> _______________________________________________
> 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
>
>

Follow ups

References