FHIR's validator

404 views
Skip to first unread message

Mitchell

unread,
Dec 4, 2015, 11:57:33 AM12/4/15
to SMART on FHIR
Hey there, 
as anyone ever used FHIR's validator? Im trying to make use of  in order to get a correct body to which i can post to my localhost and hopefully add a new patient. but...
 
when i run this line (direct from FHIR's site): 
       java -jar org.hl7.fhir.validator.jar http://hl7.org/fhir/patient-example.html(**or any file of my choice**) -defn ../validation.xml.zip -profile http://hl7.org/fhir/StructureDefinition/daf-patient

i get:
       Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/IOUtils

someone else mentioned that i need to download the file and put in my class path.

in the terminal i have put into the terminal: 

java -cp ../commons-io-2.4-bin.zip -jar org.hl7.fhir.validator.jar http://hl7.org/fhir/patient-example.html -defn ../validation.xml.zip -profile http://hl7.org/fhir/StructureDefinition/daf-patient

to no avail. 

Has anyone ever gotten this working? Can some one help me configure this? Do I need an IDE, am I not importing the jar correctly?


if anyone could share with me their xml or json of a  correct post to localhost:9080/Patient -(trying to add a new patient) - that would be a lot easier :)

Nikolai Schwertner

unread,
Dec 4, 2015, 12:15:18 PM12/4/15
to smart-...@googlegroups.com
Can't help with the validator, but you can find examples of valid SMART-on-FHIR resources here:
http://docs.smarthealthit.org/profiles
--
You received this message because you are subscribed to the Google Groups "SMART on FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smart-on-fhi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Teirney

unread,
Aug 1, 2016, 7:47:40 AM8/1/16
to SMART on FHIR
I managed to get this working by downloading and extracting the commons-io jar file and putting both the commons-io jar and validator jar onto the classpath and invoking the main class directly. Note that the commons-io.jar to use is inside the commons-io-2.4-bin.zip file.

java -cp "commons-io-2.5.jar:org.hl7.fhir.validator.jar" org.hl7.fhir.dstu2.validation.Validator http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu2/Patient/1 -defn validation-min.xml.zip -profile http://hl7.org/fhir/StructureDefinition/daf-patient

Amjith Khader

unread,
Dec 27, 2018, 1:37:10 PM12/27/18
to SMART on FHIR
I am running your command and I am getting an error as 
Could not find or load main class org.hl7.fhir.dstu2.validation.Validator
Reply all
Reply to author
Forward
0 new messages