We have created a patient resource using FHIR, is there any tool or mechanism to validate whether the created JSON Object is in proper FHIR standard ,
4 Answers
See FHIR Validation from the FHIR Spec.

- 3,538
- 3
- 15
- 17
-
1Please always include/quote the core of the answer from the link. If the link changes this answer won't be helpful anymore. – hatef Jun 27 '19 at 09:35
-
Well, yes, generally true but this is a controlled standard, the link won't change in non-useful ways – Grahame Grieve Jun 27 '19 at 13:06
Finally got it .... FHIR Validator using a jar
1.Install java 1.7 2.Download the jar from the link (https://fhir.github.io/latest-ig-publisher/org.hl7.fhir.validator.jar) 3.Double click the jar it will get installed 4.Place the json of patient resource in a specific path and refer the path to the below command . if output of the resource validator is required then specify the path for that to. command : java -jar org.hl7.fhir.validator.jar c:\temp\patient.json -output c:\temp\validation.json

- 292
- 1
- 15
If you are using HAPI and Java, you can use the IParser.parseResource()
method, as shown here:
FhirContext fhirCtx = FhirContext.forDstu3(); // DSTU3
IParser p = fhirCtx.newJsonParser();
p.setParserErrorHandler(new StrictErrorHandler());
try {
p.parseResource(jsonAsString); // Pass your Patient's JSON string here
} catch (Exception e) {
// Do something here
}

- 5,770
- 4
- 23
- 50
One way is to run validation operation on supported FHIR resource,
with precondition to check FHIR server capability statement for support.
Example: URL: [base]/Resource/$validate
Check this HL7 FHIR post on validation: Validate a resource

- 5,815
- 9
- 32
- 69