Closed jeffeastman closed 5 years ago
I pulled and rebuilt the latest v4.0.0-SNAPSHOT of hapi-fhir-jpaserver-starter and installed it into Tomcat. I switched my test to use happy-fhir-structures-r4-3.7.0.jar. When I run my provisioning test I get an e500 posting this bundle:
When I drop the bundle into the main Transaction window of the UI, I get a slightly different error:
Warning! Error: HTTP 500 : Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "Untitled Diagnostic Report" (template: "diagnosticreport" - line 15, col 152)
I can duplicate this error by removing the id from one of the DiagnosticReports in the bundle and Creating it on the DiagnosticReport Create page.
{
"resourceType": "DiagnosticReport",
"extension": [
{
"url": "http://mihin.org/extension/copyright",
"valueString": "Copyright 2014-2019 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
}
],
"identifier": [
{
"use": "official",
"system": "http://mihin.org/fhir/sid/elementId",
"value": "b13e2d3a-f37b-4137-abbf-2a93f90c0e1c"
}
],
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "47527-7"
}
]
},
"subject": {
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient/2940"
},
"encounter": {
"reference": "Encounter/Encounter-184",
"display": "Wellness Visit"
},
"effectivePeriod": {
"start": "2016-01-13T10:40:00-05:00",
"end": "2016-01-13T10:40:00-05:00"
},
"issued": "2016-01-13T10:40:00.000-05:00",
"performer": [
{
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Practitioner/1600"
}
],
"result": [
{
"reference": "Observation/Observation-16492",
"display": "Negative_HPV_Report_Observation_1"
}
]
}
got the same bug (i think):
Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "not result.resource.interpretation.textElement.empty" (template: "diagnosticreport" - line 68, col 17)full stacktrace
got it during a transaction containing this DiagnosticReport:
"resource": {
"resourceType": "DiagnosticReport",
"identifier": [
{
"system": "http://molit.eu/fhir/genomics/NamingSystem/cegat/reportID",
"value": "5566"
}
],
"status": "final",
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0074",
"code": "GE",
"display": "Genetics"
}
]
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "81247-9",
"display": "Master HL7 genetic variant reporting panel"
}
]
},
"subject": {
"reference": "urn:uuid:2fa6469d-8651-427a-afd5-ca8747a2d9d6"
},
"issued": "2019-08-05T22:42:18.699+02:00",
"performer": [
{
"reference": "urn:uuid:af503251-4d97-41a3-98f6-cf84b4925be6"
}
],
"specimen": [
{
"reference": "urn:uuid:798716f2-1b8f-44e2-a5ab-a5fb80eecea3"
}
],
"result": [
{
"reference": "urn:uuid:5e158672-b828-4c98-ae6c-7607b29742ff"
},
{
"reference": "urn:uuid:8255bd22-c997-45d5-b36a-8c205b5d0cca"
},
{
"reference": "urn:uuid:657585a9-25a1-4c6a-be9e-69eea521d578"
},
{
"reference": "urn:uuid:942f01ff-78f3-4e8f-858a-7f7ad82f2321"
},
{
"reference": "urn:uuid:8eecdab7-906c-4ebc-93ef-2b11d972e3c1"
},
{
"reference": "urn:uuid:e52e015d-6f1a-4629-a87c-39653c4bb689"
},
{
"reference": "urn:uuid:808cc6ae-ec78-4a00-b56c-4bbec514cd81"
},
{
"reference": "urn:uuid:b5470e6f-c2d1-4039-8cf5-549f369ba345"
},
{
"reference": "urn:uuid:06ea7551-acb7-4998-977e-d51ac7c57ae5"
},
{
"reference": "urn:uuid:7862d3d6-227b-419c-8dc0-3d73c155e347"
},
{
"reference": "urn:uuid:3a7f2a32-6511-4544-9984-1c4a90a3be99"
},
{
"reference": "urn:uuid:e20bea81-ebc8-4a6e-a703-9f3d19b9f1c7"
},
{
"reference": "urn:uuid:753c9fb7-9208-408a-941f-8279cf57e4cd"
},
{
"reference": "urn:uuid:7551b625-2768-4990-b590-96749b3d585f"
},
{
"reference": "urn:uuid:d9abc5b0-f997-4ff3-9629-f7bb72f27485"
},
{
"reference": "urn:uuid:a548b73e-7657-4592-86a2-fc1663d1c75b"
},
{
"reference": "urn:uuid:10ae076f-4d88-4995-badd-bf9735ab4ccf"
},
{
"reference": "urn:uuid:625ca91e-b3df-44e4-bc86-28d3b0217678"
},
{
"reference": "urn:uuid:982d3e7c-04b6-401c-a229-217765e89ab1"
},
{
"reference": "urn:uuid:c39cca52-7d7d-4290-9939-745564e63568"
},
{
"reference": "urn:uuid:f2ff7f28-6af5-40fe-86b5-44795bc661cb"
},
{
"reference": "urn:uuid:cfbbb910-bd43-497d-be9d-c263abba2453"
},
{
"reference": "urn:uuid:98c20fd0-7e05-4db7-ae0e-5415b0bab279"
},
{
"reference": "urn:uuid:7ee6c960-1386-4526-a018-9d390cad3a35"
},
{
"reference": "urn:uuid:e8c04027-15c4-4bbc-a03b-cbf23335ce5b"
},
{
"reference": "urn:uuid:4d7aa6d7-df38-493e-881b-3c450d921b7f"
},
{
"reference": "urn:uuid:f9f81a05-dfea-4f82-a225-23859326e568"
},
{
"reference": "urn:uuid:2b98dfc2-27f7-4d6d-a165-77ca701ff445"
},
{
"reference": "urn:uuid:9056d967-7df0-4b83-a207-c2a97caf2b84"
},
{
"reference": "urn:uuid:5ea19505-a1f6-44b6-9955-3f7504b66c67"
},
{
"reference": "urn:uuid:0db9f520-db3f-4349-8b53-02ed3fa7e444"
},
{
"reference": "urn:uuid:83f68ae9-ef46-483a-9fc9-16dd0e364ebc"
},
{
"reference": "urn:uuid:e44e3765-f010-4f08-a3d1-1ff5c9a90c67"
},
{
"reference": "urn:uuid:022c4c45-74cd-48c3-9135-dc46d81aa766"
},
{
"reference": "urn:uuid:2748587b-9891-4d6d-a550-8ce5cd614b91"
},
{
"reference": "urn:uuid:11dcf68a-4202-4eb1-82c0-f4e9c3ebb1d0"
},
{
"reference": "urn:uuid:34a6aa70-f92b-444d-9942-75333101b776"
},
{
"reference": "urn:uuid:d4e56b01-633d-4529-9f25-1f537773185f"
},
{
"reference": "urn:uuid:8991687a-7d4b-4706-b852-4fa0e60ef568"
},
{
"reference": "urn:uuid:b9414b59-9bfa-4aa0-81dd-2bf43bdee329"
},
{
"reference": "urn:uuid:3ebdebaa-01de-4c29-9469-b4f404514fa6"
}
]
}
I'm not able to reproduce this on current master - The examples here give an error prior to the fix for #1390 but not after.
I don't know why I'm still getting this error. I just did a pull of master on happy-fhir-jpaserver-starter followed by a _git checkout rel4.0.0 and mvn clean install -DskipTests=true. The new war file was copied to tomcat/webapps and restarted.
My test failed at exactly the same point with:
Warning!
Error: HTTP 500 : Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "Untitled Diagnostic Report" (template: "diagnosticreport" - line 15, col 152)
Pulling the last DiagnosticReport out of the bundle, removing its id: and using the UI to Create it gives me
Warning!
Error: HTTP 500 : Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "Untitled Diagnostic Report" (template: "diagnosticreport" - line 15, col 152)
So maybe I'm not doing the build correctly?
For reference, here's that DiagnosticReport:
{
"resourceType": "DiagnosticReport",
"extension": [
{
"url": "http://mihin.org/extension/copyright",
"valueString": "Copyright 2014-2019 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
}
],
"identifier": [
{
"use": "official",
"system": "http://mihin.org/fhir/sid/elementId",
"value": "550788cd-8984-4e04-aab4-e2d02b11171b"
}
],
"status": "final",
"code": {
"coding": [
{
"system": "http://www.ama-assn.org/go/cpt",
"code": "88164"
}
]
},
"subject": {
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient/2940"
},
"encounter": {
"reference": "Encounter/Encounter-184",
"display": "Wellness Visit"
},
"effectivePeriod": {
"start": "2016-01-13T10:40:00-05:00",
"end": "2016-01-13T10:40:00-05:00"
},
"issued": "2016-01-13T10:40:00.000-05:00",
"performer": [
{
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Practitioner/1600"
}
],
"result": [
{
"reference": "Observation/Observation-16492",
"display": "Negative_HPV_Report_Observation_1"
}
]
}
Should the UI's Software version be HAPI FHIR Server - 3.8.0?
The pom.xml still says
<parent>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId>
<version>3.8.0</version>
</parent>
Ah well, that is definitely a problem... Are you on the right branch? It's 4.0.0-SNAPSHOT in git:
https://github.com/hapifhir/hapi-fhir-jpaserver-starter/blob/rel_4_0_0/pom.xml
git checkout rel_4.0.0 and mvn clean install -DskipTests=true? git status On branch rel_4.0.0
Add "-U" to the command line to make sure you get the latest snapshot depenencies too..
On Wed, Aug 7, 2019 at 3:40 PM jeffeastman notifications@github.com wrote:
git checkout rel_4.0.0 and mvn clean install -DskipTests=true?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1399?email_source=notifications&email_token=AA2N7HMKMPX6BBUZSLZA3WLQDMQMNA5CNFSM4IHFJW72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3ZP3UY#issuecomment-519241171, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2N7HPTTF6ER3AQG4F37B3QDMQMNANCNFSM4IHFJW7Q .
Had to delete my old checkout but now I have the right pom.xml Unfortunately it doesn't build )-:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java:[10,23] error: cannot find symbol
symbol: class PortUtil
location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java:[15,23] error: cannot find symbol
symbol: class PortUtil
location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu2IT.java:[8,23] error: cannot find symbol
symbol: class PortUtil
location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java:[49,18] error: cannot find symbol
symbol: variable PortUtil
location: class ExampleServerR4IT
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java:[49,12] error: cannot find symbol
symbol: variable PortUtil
location: class ExampleServerDstu3IT
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu2IT.java:[35,12] error: cannot find symbol
symbol: variable PortUtil
location: class ExampleServerDstu2IT
Github thinks there's a build problem too.
Are you able to replicate this on our public test server? I.e. does uploading the same resource with no narrative produce the same results? A replicable test case would be ideal.
On Thu, Aug 8, 2019 at 8:17 PM jeffeastman notifications@github.com wrote:
Github thinks there's a build problem too.
[image: Screen Shot 2019-08-08 at 8 16 22 PM] https://user-images.githubusercontent.com/8631956/62745551-70260780-ba19-11e9-8230-c9ac917e43ad.png
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jamesagnew/hapi-fhir/issues/1399?email_source=notifications&email_token=AA2N7HJHNLWIFH3M7TW3XRTQDSZRVA5CNFSM4IHFJW72YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD35HTTY#issuecomment-519731663, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2N7HOCTPICGIHMYSGZKQTQDSZRVANCNFSM4IHFJW7Q .
Haven't tried to replicate the upload. The issue I'm confronting is the real_4_0_0 branch won't build on my machine and it evidently fails to compile on GitHub too.
According to the spec: "Typically, a report is either: all data, no narrative (e.g. Core lab) or a mix of data with some concluding narrative (e.g. Structured Pathology Report, Bone Density), or all narrative (for example a typical imaging report, histopathology). This resource provides for these 3 different presentations:" My generated FHIR data has never contained any narratives and I'm able to provision a v3.7.0 version of happy-fhir-jpaserver-starter at MiHIN just fine.
Having same issue, but I was able to load your bundle on the public HAPI server -> http://hapi.fhir.org/baseR4/DiagnosticReport?_id=131328&_pretty=true
I've been trying to load synthea created patient bundles and fail with same error, I will be trying updated code soon.
@sdatchley Please post if you're able to build the rel_4_0_0 branch. I'm still getting the same errors as I did two days ago after another fresh clone of the branch
@sdatchley Please post if you're able to build the rel_4_0_0 branch. I'm still getting the same errors as I did two days ago after another fresh clone of the branch
I did a build of rel_4_0_0 using latest versions after wiping my maven cache. Had to disable tests in order to compile (same errors you had) and it compiled fine. Also, change from derby to h2 db not working out of the box, so i reverted to using derby per 3.8 settings. Also had to enable snapshots in repositories section of POM.
Upon trying to upload my test bundle I get same error
Warning! Error: HTTP 500 Server Error: Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "not result.resource.interpretation.textElement.empty" (template: "diagnosticreport" - line 68, col 17)
Attached is my test patient bundle Seth414_Schulist381_b13b7bde-d867-4c8f-b596-156c8763080a.json.txt
I can verify that I do have the hapi-fhir-base-4.0.0-SNAPSHOT.jar with the #1390 fix for the DiagnosticReport.html when this occurs.
I wiped my .m2 repository and rebuilt the latest hapi-fhir. I still cannot compile hapi-fhir-jpaserver-starter, even with -DskipTests=true. I'm still on java version "1.8.0_211". Could this be the problem?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile (default-testCompile) on project hapi-fhir-jpaserver-starter: Compilation failure: Compilation failure:
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java:[10,23] error: cannot find symbol
[ERROR] symbol: class PortUtil
[ERROR] location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java:[15,23] error: cannot find symbol
[ERROR] symbol: class PortUtil
[ERROR] location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu2IT.java:[8,23] error: cannot find symbol
[ERROR] symbol: class PortUtil
[ERROR] location: package ca.uhn.fhir.util
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerR4IT.java:[49,18] error: cannot find symbol
[ERROR] symbol: variable PortUtil
[ERROR] location: class ExampleServerR4IT
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu3IT.java:[49,12] error: cannot find symbol
[ERROR] symbol: variable PortUtil
[ERROR] location: class ExampleServerDstu3IT
[ERROR] /Users/jeff/gitrepo/hapi-fhir-jpaserver-starter/src/test/java/ca/uhn/fhir/jpa/starter/ExampleServerDstu2IT.java:[35,12] error: cannot find symbol
[ERROR] symbol: variable PortUtil
[ERROR] location: class ExampleServerDstu2IT
[ERROR] -> [Help 1]
@jeffeastman use -Dmaven.test.skip=true i used that instead of the surefire plugin directive -DskipTests. maven.test.skip doesn't even try to compile the tests.
@sdatchley Thanks for the -Dmaven... it now builds but, as you observed, the new h2 settings don't work. I will also revert to the 3.8.0 settings and try one more time...
Well, I changed the hapi.properties.datasource... entries to
datasource.driver=org.apache.derby.jdbc.EmbeddedDriver
datasource.url=jdbc:derby:directory:target/jpaserver_derby_files;create=true
and the pom.xml entries to
<!-- This example uses Derby embedded database. If you are using another database such as Mysql or Oracle, you may omit the following dependencies and replace them with an appropriate database client
dependency for your database platform. -->
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
</dependency>
but the server won't start. Log says
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.commons.dbcp2.BasicDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
Did I miss something else?
Make sure you pull the derby jar after you updated the pom.
Also, you need: hibernate.dialect=ca.uhn.fhir.jpa.util.DerbyTenSevenHapiFhirDialect in the properties file as well, has the h2 dialect
FYI- I've just pushed a fix to the jpaserver starter's rel_4_0_0
branch. I was seeing that too.
I'm able to build the starter but it only runs in Tomcat with the derby files above. And, it still bombs with my bundle:
Warning!
Error: HTTP 500 : Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "not result.resource.interpretation.textElement.empty" (template: "diagnosticreport" - line 68, col 17)
Using the GUI to Create the DiagnosticReport in the Bundle worked this time.
{
"resourceType": "DiagnosticReport",
"extension": [
{
"url": "http://mihin.org/extension/copyright",
"valueString": "Copyright 2014-2019 Michigan Health Information Network Shared Services. Licensed under the Apache License, Version 2.0 (the 'License'); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License."
}
],
"identifier": [
{
"use": "official",
"system": "http://mihin.org/fhir/sid/elementId",
"value": "8ae4ea87-d7f5-4f5b-a164-995aa260ab0d"
}
],
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "44249-1",
"display": "PHQ-9 quick depression assessment panel [Reported.PHQ]"
}
]
},
"subject": {
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Patient/2966"
},
"encounter": {
"reference": "Encounter/3958",
"display": "Wellness Visit"
},
"effectivePeriod": {
"start": "2015-10-14T09:28:00-04:00",
"end": "2015-10-14T09:28:00-04:00"
},
"issued": "2015-10-14T09:28:00.000-04:00",
"performer": [
{
"reference": "http://localhost:8080/hapi-fhir-jpaserver/fhir/Practitioner/1926"
}
],
"result": [
{
"reference": "Observation/Observation-15895",
"display": "Record_PHQ-9_Observation_1"
}
]
}
If I remove that DiagnosticReport from the above bundle, the server accepts the new transaction.
The issue seems to be with the expression result.resource.interpretation.textElement.empty in DiagnosticReport.html. In the dstu3 Observation interpretation is CodeableConcept, however in R4 it is now List < CodeableConcept >, hence thymeleaf is trying to pull textElement from ArrayList, which of course isn't going to work. Assuming need to refactor this to use a th:each for each interpretation?
If I switch to using DSTU3 instead of R4, the bundles load with no issues as expected.
Ahhh so this is an R4 thing! Aha!
I would have never found that one, but @sdatchley did and @jamesagnew 's latest commit fixes the problem for me.
+1 for closing this one!
Reposting from hapi-fhir-jpaserver-starter as it evidently relates to happy-fhir-base-4.0.0-SNAPSHOT:
Opening a ticket on this so it doesn't get lost in email threads:
Using the v4.0.0-SNAPSHOT of July 22 and happy-fhir-structures-r4-3.7.0.jar and posting via the hapi-fhir-jpaserver-starter UI, I get:
(James had indicated this snapshot contained a fix to happy-fhir-base-3.8.0 that resolved a similar but different issue with a similar bundle. I'm going to re-run using happy-fhir-structures-r4-3.7.0.jar and will post those results too)
Warning! Error: HTTP 500 : Failed to call access method: org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "not result.resource.interpretation.textElement.empty" (template: "diagnosticreport" - line 68, col 17)
When posting this bundle:
bundle.json.txt