hey joaquin.  here are more answers to your three questions, for htmlforms.

1.  htmlforms allow you to use the same concept multiple times, but if that
concept is grouped with other concepts, then you need to put each group in
its own distinct obsgroup.

For example, say you ask the following two questions multiple times on an
intake form after a patient transfer (I'm making this up, but just roll
with it):  'previous cd4 count', 'lab where test was performed'.  If for a
given patient you want to enter more than one of these pairs, you MUST put
each pair in its own distinct obsgroup -- otherwise, you won't know which
test result corresponds to which lab.

If you're thinking about using htmlform schemas to generate data import
templates, this is straightforward for 'flat' htmlforms.  The hard part
will be if you want to fully support obsGroups -- which would mean
representing N-depth obsGroup heirarchies in auto-generated templates.
(Although if you have a use case involving obsGroups at all, it probably
can be handled with just 1 level of obsGroups (like infopath)).

And, to get at an htmlform's schema, i've always done this with code -- you
start a FormEntrySession using the form you're interested in and a fake
patient, and then you can navigate the FormEntrySessions' schema objects --
there's a getSchema method in there somewhere.

2.  if you don't specify obs_datetime explicitly, these default to
encounter_datetime

3.  htmlforms allow you to add the showDate attribute for any obs tag,
which will render a date field for that obs that is mapped to
obs.obs_datetime.  So its up to the form designer to expose this or not.

d

On Sun, May 6, 2012 at 8:49 AM, Burke Mamlin <[email protected]>wrote:

> Joaquín,
>
> obs.obs_datetime should always be set and should be the best approximate
> to the point in time that the observation occurred (i.e., the physiologic
> time for laboratories, the time that the question was asked for
> questionnaire questions, etc.).  If the obs doesn't have an independent
> time (true in most cases), then use the timestamp of the encounter.
>
> If you have groups of observations for which you are automatically
> creating encounters, I would suggest setting the timestamp of the encounter
> (encounter.encounter_datetime) based on the observations rather than the
> time of import (e.g., the earliest timestamp amongst the group of
> observations).  The encounter.date_created will reflect the time of
> import.  So, in your option #1, use the earliest timestamp amongst the
> group of observations being imported as an encounter as the
> encounter_datetime.
>
> -Burke
>
> On Sun, May 6, 2012 at 10:47 AM, Joaquín Blaya <
> [email protected]> wrote:
>
>> We're in the process of designing how the spreadsheet import module will
>> create a new encounter (and optionally be able to show it in a form). We've
>> run into a question which is how to import multiple observations with
>> different observation dates for the same concept in the same encounter.
>>
>> An example is in the testdata excel that comes with the import module,
>> where for the concept weight, you have two observations, each with a
>> different date. So our idea was
>> 1. if the user chooses to create an encounter with the import, the
>> encounter_datetime is the datetime of the import
>> 2. if the user chooses to put an obs_datetime it will associate it with
>> that specific obs. Otherwise, it will put the obs_datetime of all obs the
>> same as the encounter_datetime
>>
>> The questions I have are
>>
>>    1. Is there a way to show multiple observations for the same concept
>>    (perhaps even with different obs_datetime) within the same form?  I can 
>> see
>>    that it can be done for an encounter and when you click on Edit it shows
>>    you all of the obs with their datetime if it's been changed, but can it be
>>    done in HTML Form or XForm?
>>    2. Must each observation have a obs_datetime, or if the obs_datetime
>>    is null it looks at the encounter_datetime?  This is to define if the
>>    module should automatically fill in each obs_datetime or not
>>    3. Is there a way in HTML Form Entry and XForms to show the
>>    obs_datetime within the form?
>>
>> Thanks,
>>
>> Joaquín
>>
>
> ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to