Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register

Ticket #656 (new task)

Opened 5 months ago

Last modified 3 months ago

Move Complex Obs support to the file system

Reported by: bmckown Assigned to: bmckown
Priority: major Milestone: OpenMRS 1.4
Component: OpenMRS Code Base Keywords:
Cc: djazayeri

Description

Move support for complex obs to the file system. See [Developers Conference Call 2008-03-20].

1. Move complex obs from the database to the filesystem:

a) Remove complex_obs and mime_type tables from the database.
b) Add obs.value_complex column in obs table, where value_complex is a urn for the complex obs in the filesystem. The urn should contain the mime type for the complex obs (.doc, .xml, .png, etc.).
c) Add a global property for the default file system location where complex obs are stored.

2. Make necessary changes in the api in:

a) Obs.java
b) Hibernate mapping
c) Controllers and web layer.

3. Create a module that can fetch and preview complex obs.
4. See related ticket: [107]

Change History

03/25/08 14:22:27 changed by djazayeri

  • cc set to djazayeri.

I imagine that when I upload a file as a complex obs, I'd like to also give a description for the file, so that it can be displayed prettily on the patient dashboard.

There's no easy way to do this with the proposed data model here, besides having an obs group that contains the complex obs and also a free-text obs. Which doesn't sound right.

03/27/08 12:34:58 changed by bmamlin

To follow the HL7 lead (again)1...

HL7 defines the following model:

  • concept_complex
    • source: "a unique name that identifies the system that is the source of the data." For us, this would be a reference to the handler ... perhaps it could be a FK to a concept_complex_handler table?
    • type: mime type2
    • subtype : mime sub type2
    • encoding : A = ASCII, Hex = hex digits, or Base643

So, we'd need the concept_complex table modeled and the concept editing screens adjusted so that setting the datatype to complex would open the fields for the complex type specifics.

Then add the obs.value_complex as a text attribute (we need to decide on length for this field...probably should err on bigger...but not too big to bloat obs table). This would contain the URN information that comprises handler + unique key for handler to find resource. Etc, etc. as you've described.

RE: darius' comment about including support for a "title" ... well, we should discuss it and bring a solution back here.

1 HL7 2.6 2.A.24
2 RFC 2045
3 Base64 on Wikipedia

05/27/08 12:03:25 changed by bwolfe

  • owner changed from somebody to bmckown.
  • milestone set to OpenMRS 1.4.