How to get FHIR java models for all the FHIR resources?

321 views
Skip to first unread message

otcus...@gmail.com

unread,
Apr 20, 2018, 10:14:17 AM4/20/18
to HAPI FHIR
Hello,
           We need to build our application with FHIR schema in our database.

           1. What is the way do need to follow?
           2. Can we use only FHIR HAPI models i.e. java models for all FHIR resources in our application?
           3. How to get FHIR models

Please help us on this.

James Agnew

unread,
Apr 20, 2018, 10:53:42 AM4/20/18
to otcus...@gmail.com, HAPI FHIR
Hi there,

Instructions on how to use HAPI FHIR, where to download it, etc. can be found on our website: http://hapifhir.io/

Cheers,
James

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/1dda4ce0-a5d2-4cbd-8377-41f2f18334f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

otcus...@gmail.com

unread,
Apr 23, 2018, 12:15:56 PM4/23/18
to HAPI FHIR
Hello,
This was helpful. Already we have gone through it. We think it will satisfy our requirements

We need to have resources in our application with FHIR schema(json format) in first phase and once proved then in second phase implement/use HAPI in our application

And found this link useful

http://hapifhir.io/doc_fhirobjects.html

But unable to understand how to implement it.
We understood that 2 components to be used structures and parser that will declare models, assign value to it and encode it in json and store it our application

What to download and add in our application and use it that we are unable to figure it out.

So, plz help us out.


otcus...@gmail.com

unread,
Apr 23, 2018, 12:22:15 PM4/23/18
to HAPI FHIR
Hello James,

Can you please specify what are the only projects we need to add in our application. Or do we need to add all
HAPI FHIR source code for the functionality?

James Agnew

unread,
Apr 23, 2018, 1:20:43 PM4/23/18
to otcus...@gmail.com, HAPI FHIR
I would recommend starting by learning about the Maven build system: http://maven.apache.org

From there, these sample projects give a good example of how to import HAPI FHIR into your project: https://github.com/FirelyTeam/fhirstarters/tree/master/java

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.
To post to this group, send email to hapi...@googlegroups.com.

otcus...@gmail.com

unread,
Apr 25, 2018, 9:58:20 AM4/25/18
to HAPI FHIR

Hello,


You have mentioned in your previous post the below link to start up with HAPI

https://github.com/FirelyTeam/fhirstarters/tree/master/java

 

Also, on github it's mentioned that it is meant to be familiar with HAPI PHIR implementation

 

 

What we used in our application from FHIRStarters:

 

       The same implementation that is specified in below sample:

       https://github.com/FirelyTeam/fhirstarters/blob/master/java/hapi-fhirstarters-model-and-parser-examples/src/main/java/ca/uhn/fhir/example/Example04_EncodeResource.java

 

       1) adding maven dependencies

       2) import hl7.fhir.dstu3 packages

       3) creating a model object

       4) set values

       5) convert to json

       6) utilize that json in our application

 

 

But what if we use it for Production:

 

               

                1) are there any schema difference between schema generated from FHIRStarters and schema generated from HAPI FHIR project?

 

                2) Is it totally free if we use this implementation for Production or Commercial use?

 

               3) is there any dependencies that use online resources in this implementation which may further breakdown implementation in our production application?

 

                4) Does FHIRstarters cover all the FHIR 3.0 resources implementation?

 

                5) Will FHIRstarters be updated timely as we progress with FHIR HAPI versions?

 

 

 

Let us know if any further information needed, Your help is highly appreciated.

 


On Monday, April 23, 2018 at 10:50:43 PM UTC+5:30, James Agnew wrote:
I would recommend starting by learning about the Maven build system: http://maven.apache.org

From there, these sample projects give a good example of how to import HAPI FHIR into your project: https://github.com/FirelyTeam/fhirstarters/tree/master/java
On Mon, Apr 23, 2018 at 12:22 PM, <otcus...@gmail.com> wrote:
Hello James,

  Can you please specify what are the only projects we need to add in our application. Or do we need to add all
HAPI FHIR source code for the functionality?

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

James Agnew

unread,
Apr 25, 2018, 10:11:30 AM4/25/18
to otcus...@gmail.com, HAPI FHIR

                1) are there any schema difference between schema generated from FHIRStarters and schema generated from HAPI FHIR project?

                4) Does FHIRstarters cover all the FHIR 3.0 resources implementation? 

                5) Will FHIRstarters be updated timely as we progress with FHIR HAPI versions?


The FHIRStarters repository is simply a collection of sample projects. It is updated roughly once a year, but it does not use every resource type or every feature in HAPI FHIR. The sample projects use HAPI FHIR, so they do not generate schemas. They show various ways you can use HAPI FHIR.

                2) Is it totally free if we use this implementation for Production or Commercial use?

 

Yes, HAPI FHIR is licensed under the terms of the Apache Software License 2.0. It is free and will always be free.


               3) is there any dependencies that use online resources in this implementation which may further breakdown implementation in our production application?

 

I'm sorry, I don't understand this question. You can see a list of HAPI's dependencies in Maven's file though. Please consult the Maven documentation if you need to learn how to do that.

Cheers,
James


To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+unsubscribe@googlegroups.com.

To post to this group, send email to hapi...@googlegroups.com.

otcus...@gmail.com

unread,
Apr 25, 2018, 12:31:49 PM4/25/18
to HAPI FHIR
Hello,

You've specified as below in your comments

"it does not use every resource type or every feature in HAPI FHIR.


Can you plz clarify on "every resource type" here.

Also for now we don't need other functionality than json schema for Phase I of our application.That we are targeting for second phase

So our need is to save the data for our health care application in fhir schema. We have used only the generated json from encodeResourcetoString method which is specified in below code which is taken from fhir starter sample.

Does this json schema is compatihle with FHIR 3.0?


-----------------------------------


Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("7000135");
pat.addTelecom().setUse(ContactPointUse.HOME).setSystem(ContactPointSystem.PHONE).setValue("1 (416) 340-4800");
pat.setGender(AdministrativeGender.MALE);

// Create a context
FhirContext ctx = FhirContext.forDstu3();

// Create a JSON parser
IParser parser = ctx.newJsonParser();
parser.setPrettyPrint(true);

String encode = parser.encodeResourceToString(pat);

------------------------------'''

Reply all
Reply to author
Forward
0 new messages