Using fhirbase with Rails

190 views
Skip to first unread message

Iaam Onkara

unread,
Apr 10, 2016, 1:16:52 PM4/10/16
to FHIRbase
Hi,

I am planning to use FHIRbase in our existing Rails app and I am looking for some pointers . Any help will be greatly appreciated

Since FHIRBase uses pl/sql to manage CRUD of fhir resources
  1.  it doesn't seem our existing ActiveRecord models is the best fit if at all i.e. ActiveRecord#save won't work unless overridden even then there will be lot of problems I think. So would you recommend 
    1. dropping the ActiveRecord layer completely and directly use fhir_create_resource, fhir_delete_resource etc, 
      1. hence no reliance on ActiveRecord validations or dependent collections includes 
    2. OR
    3. use ActiveModel 
      1. to establish entity relations between resources 
      2. to use validations e.g. validates_presence|format_of etc
  2. would you recommend using fhir_create_storage for non FHIR resources like wearable data (fitbit etc)  OR should I use FHIR Extensions

Thank in advance for your time and guidance.

Best Regards,
Onkara

Николай Рыжиков

unread,
Apr 12, 2016, 2:06:30 AM4/12/16
to Iaam Onkara, FHIRbase

1) yes, AR is wrong fit for fhirbase. I would suggest use Sequel, PORO (or even just hash/struct) and create facade for PostgreSQL functions calls . Fhirbase implements most of ORM functionality, not so convenient as in ROR, but compatible with FHIR spec.

Validation in terms of FHIR should be done by profiling. We are trying to convert profiles (structure definitions) to json schema (https://github.com/fhir-js/fhir-schema) and reuse existing json schema engines ( instead of code generation like in HAPI and .NET ref. implementation).

2) About custom resources - FHIR by design makes it little bit tricky, provides special resource https://www.hl7.org/FHIR/2015Sep/basic.html and encourages to discuss your needs with community, before inventing new one.

So rise discussion on chat.fhir.org about missing parts and join the community ;)

73's nicola

--
You received this message because you are subscribed to the Google Groups "FHIRbase" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fhirbase+u...@googlegroups.com.
To post to this group, send email to fhir...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fhirbase/daa1d6a6-ecd7-4771-8f30-749104740cc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages