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 > _________________________________________ 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]

