Comments (7)
stinking Java is awful at reading dates.... Let's see if the next release (32 - 31 is already in process) fixes this :-(
from org.hl7.fhir.core.
resolved - someone else ran into the same problem and tested 33 for me.
from org.hl7.fhir.core.
Unfortunatly, this is not true for me, I compiled version 33 and still got the issue.
I did some deeper digging and after some time I discovered that the way SimpleDateFormat is parsing month and weekday names is dependending on the language setting of the system. Because my computer's language is set to German, those month and weekday names are different and the parsing fails. Adding Locale.ENGLISH
to the SimpleDateFormat in org.hl7.fhir.utilities.cache.PackageCacheManager#readDate
resolved this issue for me.
Now, I'm experiencing another issue: Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Unable to find the package source for 'hl7.fhir.core#4.0.1' at http://hl7.org/fhir/R4/package.tgz
. Is this related or should I create another ticket for this?
from org.hl7.fhir.core.
well, thanks. Stupid Java. I updated that code and looked at every use of SimpleDateFormat.
The other issue is not related. But it would be useful if you trace the source of hl7.fhir.core... it should not be used any more
from org.hl7.fhir.core.
It is coming from org/hl7/fhir/r4/validation/Validator.java
, line 256 and is the default value in case the defn parameter is not defined.
from org.hl7.fhir.core.
from org.hl7.fhir.core.
Ah okay, I thought I'd have to use the R4 version because I'm working with R4 resources. Now, with the R5 Validator class, validation finally works. Thank You!
However, what I'm actually trying to accomplish is testing the FHIR mapping language. For the moment, I copied the script from https://www.hl7.org/fhir/patient-version-maps.html and tried to invoke the validator with C:\Users\oehmj\IdeaProjects\org.hl7.fhir.core>java -cp C:\Users\\oehmj\IdeaProjects\org.hl7.fhir.core\org.hl7.fhir.validation.cli\target\org.hl7.fhir.validation.cli-4.1.36-SNAPSHOT.jar org.hl7.fhir.r5.validation.Validator patient.fhir.json -version 4.0.1 -ig C:\Use rs\oehmj\VSCodeProjects\fhir-mapping\test.map -log out.txt -transform http://hl7.org/fhir/StructureMap/Patient4to3 -output result
FHIR Validation tool Version 4.1.36-SNAPSHOT (Git# 3f25f96aca65). Built 2019-12-20T10:31:52.134+01:00 (4 hours old)
Detected Java version: 1.8.0_231 from C:\Program Files\Java\jdk1.8.0_231\jre on amd64 (64bit). 2711MB available
Arguments: patient.fhir.json -version 4.0.1 -ig C:\Users\oehmj\VSCodeProjects\fhir-mapping\test.map -log out.txt -transform http://hl7.org/fhir/StructureMap/Patient4to3 -output result
Directories: Current = C:\Users\oehmj\IdeaProjects\org.hl7.fhir.core, Package Cache = C:\Users\oehmj\.fhir\packages
.. FHIR Version 4.0, definitions from hl7.fhir.r4.core#4.0.1
.. connect to tx server @ http://tx.fhir.org
(v4.0.1)
+ .. load IG from C:\Users\oehmj\VSCodeProjects\fhir-mapping\test.map
* load file: C:\Users\oehmj\VSCodeProjects\fhir-mapping\test.txt - ignored due to error: (null - NPE)
Exception in thread "main" java.lang.Error: Unable to find map http://hl7.org/fhir/StructureMap/Patient4to3 (Known Maps = [http://hl7.org/fhir/StructureMap/supplyrequest-transform, supplyrequest-transform, http://hl7.org/fhir/StructureMap/example|0.1, http://hl7.or
g/fhir/StructureMap/example, example])
at org.hl7.fhir.r5.validation.ValidationEngine.transform(ValidationEngine.java:1230)
at org.hl7.fhir.r5.validation.ValidationEngine.transform(ValidationEngine.java:1220)
at org.hl7.fhir.r5.validation.Validator.main(Validator.java:592)
The NPE mentioned in the log, which causes the validator to ignore the map file is caused by the r5....ValidationEngine#loadResourceByVersion
-method creating a r4...StructureMapUtilities
-Instance with null as constructur parameter for the worker-context.
I'm not sure if this is a bug or I'm just invoking the tool with the wrong command line parameters. Can You help me with this?
from org.hl7.fhir.core.
Related Issues (20)
- Address.line[] element is not converted in some versions, instead only the String value is
- CodeSystem content mode causes faulty validation errors HOT 2
- org.hl7.fhir.r4.model.codesystems package missing in R4B HOT 1
- Validator - Unable to resolve cross-version extension in slicing logic
- CLI Validator | Resolving of external profile urls not working HOT 2
- OSGI metadata of org.hl7.fhir.utilities introduces hard junit dependency HOT 22
- validator_cli confused about binding strength, causing unwarranted validation failures HOT 3
- Insecure Transformer used in XmlParsers HOT 1
- Suppress choice group element 'item' from being generated in CDA instances HOT 1
- hl7.fhir.cda package cannot be found
- checkToSeeIfSlicingExists - error while reprofiling a profile in the same IG inheriting from another IG where slices are defined
- required VS-bindings in slices are not recognized by the validator
- I18n Project for WHO HOT 1
- root cardinality of extension not taken into account
- Validator based on a directory does not check local file in profile based slices HOT 1
- Errors splitting canonical in URL and version HOT 11
- Request CDA namespace prefix be added to support Australian CDA transformations
- SNOWMED - oops
- Error element [path] launches straight into slicing without the slicing being set up properly first
- Error Index -1 out of bounds for length 0 in derived profiles where base profile has sliced value[x] element on type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from org.hl7.fhir.core.