Medical mailing list archives
medical@odoo-community.org
Browse archives
Re: FHIR on Odoo
by
LasLabs, Dave Lasley
Hi Luigi,
Welcome to the OCA medical community. In order to subscribe to the conversation, you can use this page - https://odoo-community.org/groups.
For everyone’s reference, the implementation Luigi is referring to is here - https://github.com/luigisison/odoo-fhir.
I would love to begin the conversation of how we can work towards FHIR in Odoo Medical. I see the following major issues for this initiative:
- A lot of existing workflow logic and data schemas come from non-medical modules, some of them core Odoo
- Conforming to Odoo standards and using existing modules should be prioritized over conforming to the FHIR data spec
- Forward migration path is going to be tricky for anyone using the existing modules
- FHIR overlaps significantly with pre-existing functionality & data, both in medical and non-medical contexts
Another consideration here is that v10 has been launched for our customers & we are going to begin releasing the production versions to OCA in the coming weeks. I am firmly against shifting any data models for modules that have already been finished in our incubator for any reason other than bugs. I propose that this initiative is targeted as v11 forward, except in modules that have not already been built out.
I’m wondering if this instead should be a separate project with interdependencies into the medical project? Basically an EDI for FHIR, which would allow us to have the ability to speak the standard without having to shift data models of hundreds of modules.
A theoretical strategy that I have been toying with is described below (copied from another email, sorry)
The plan is to create a system that will allow for us to create SQL views on the fly without having to actually code the view. A theoretic implantation of the mapper would look something like:
class FHIRPerson(MappedModel):
_name = 'fhir.person'
_maps = 'res.partner'
name = fields.Char()
gender = fiels.Char()
birth_date = fields.Datetime(
foreign='birthdate_date',
)
Name and gender are the same on the `res.partner` model, so we simply define them like normal. `birth_date` however is actually `birthdate_date` in Odoo, so we map an explicit foreign column.
Instead of this model generating a table though, it will generate a view looking something like the SQL:
CREATE OR REPLACE VIEW fhir_person
AS SELECT id, name, gender, birthdate_date as birth_date
FROM res_partner;
And with that, we have ourselves the ability to map an entire data schema to our existing one without having to worry about data duplication or insane migrations.
There’s a lot of edge cases with this plan though, so I’m not exactly sure how long it’s going to take me to build.
— Dave Lasley
On May 9, 2017, at 9:08 AM, Luigi Sison <lsison@moxylus.com> wrote:I would like to join the group conversation. I am implementing in Odoo the latest HL7 interoperability standard named FHIR (http://hl7.org/fhir/).Best regards,Luigi Sison |Principalmoxylus
phone +1 612 281 2551
824 Phoenix Lane | Foster City, CA 94404 | USA
lsison@moxylus.com | Our Website | My LinkedIn Profile
_______________________________________________
Mailing-List: https://odoo-community.org/groups/medical-20
Post to: mailto:medical@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe