2

I was trying to understand how the model classes are getting generated for given FHIR Resource in the below link http://build.fhir.org/ig/HL7/VhDir/StructureDefinition-vhdir-organization.html

can see XML schema, Json-schema & Schematron, Is there any way to generate the Source java classes from it ?

Syed Rafi
  • 825
  • 2
  • 12
  • 35

1 Answers1

3

Unfortunately there isn't yet a way to do this. You can generate them by hand, but the easiest thing is to use the base HAPI FHIR classes instead and just make sure you're using them according to the profile.

James Agnew
  • 701
  • 4
  • 3
  • Thanks Angew for the response will do write accordingly profile – Syed Rafi Aug 07 '19 at 18:01
  • 1
    Has anything changed in a year, since this question was asked? I'm analyzing sources of hapi-tinder-plugin and there seem to be some code-generation options, but they are based upon some built-in Excel(???) spreadsheets. Can't find anything that would generate Java sources based on published FHIR profiles from XML/JSON. – MaDa Sep 22 '20 at 13:48
  • I'm looking for this too. My whiteboard had a note "FHIR Interpreter" I thought I'd google for it. – Doug Chamberlain Feb 23 '21 at 05:05