Search code examples
javaxmlhl7-fhirhapihapi-fhir

How to generate Java Model classes from FHIR resources?


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 ?


Solution

  • 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.