Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class without _type #924

Open
6 tasks
xarranzm opened this issue Jun 25, 2022 · 4 comments
Open
6 tasks

class without _type #924

xarranzm opened this issue Jun 25, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@xarranzm
Copy link

xarranzm commented Jun 25, 2022

Configuration information

  • EHRbase version: v0.20.0
  • openEHR_SDK version:
  • Archie version:
  • PostgreSQL version: 11.5
  • Java Runtime version: openjdk-11
  • Operating System version: Ubuntu 20.04.1 LTS

Steps to reproduce

Actual result

                            "archetype_details": {
                                "rm_version": "1.0.4",
                                "template_id": {
                                    "value": "Vaccination List"
                                },
                                "archetype_id": {
                                    "value": "openEHR-EHR-ACTION.medication.v1"
                                }

Expected result (Acceptance Criteria)

                            "archetype_details": {
                                **"_type": "ARCHETYPED",**
                                "rm_version": "1.0.4",
                                "template_id": {
                                    "value": "Vaccination List"
                                },
                                "archetype_id": {
                                    "value": "openEHR-EHR-ACTION.medication.v1"
                                }

Definition of Done

  • The defect is checked by an unit or an integration test (Robot)
  • Merge Request approved
  • Unit tests passed
  • Build without errors
  • Release notes prepared
  • No additional runtime warnings
@xarranzm xarranzm added the bug Something isn't working label Jun 25, 2022
@vladislavploaia
Copy link
Contributor

Hello @xarranzm,
Could you please provide OPT content? I will check it on our latest version of EHRBase.
Thank you!

@vladislavploaia vladislavploaia added feedback Feedback from the creator of the issue is required and removed bug Something isn't working labels Jun 30, 2022
@vidi42 vidi42 added the bug Something isn't working label Jul 28, 2022
@vidi42
Copy link
Contributor

vidi42 commented Jul 28, 2022

Attaching an example .opt file, but should happen with all templates.
must.opt.zip

@vidi42 vidi42 removed the feedback Feedback from the creator of the issue is required label Jul 28, 2022
@vladislavploaia
Copy link
Contributor

Hello @xarranzm, @vidi42,
Bug reported for tracking purposes: https://jira.vitagroup.ag/browse/CDR-496
Reproduced in EHRBase version 0.22.0
Thank you!

@yampeku
Copy link

yampeku commented Aug 23, 2022

Could reproduce this when using a PUT operation for creating an EHR_ID when sending a EHRStatus object to the endpoint directly, no template involved. CreateEHR operation in the default client works fine using same EHRStatus object


org.ehrbase.client.exception.WrongStatusCodeException: Wrong Status code. Expected: [200, 204, 412]. Got: 400. Error message: {"error":"Missing type id when trying to resolve subtype of [simple type, class com.nedap.archie.rm.RMObject]: missing type id property '_type'\n at [Source: (String)\"{\"name\":{\"_type\":\"DV_TEXT\",\"value\":\"EHR Status\",\"mappings\":[]},\"archetype_node_id\":\"openEHR-EHR-EHR_STATUS.generic.v1\",\"uid\":{\"_type\":\"OBJECT_VERSION_ID\",\"value\":\"14f9101d-c3cd-553d-a455-bbc07a999fda\"},\"archetype_details\":{\"archetype_id\":{\"value\":\"openEHR-EHR-EHR_STATUS.generic.v1\"},\"rm_version\":\"1.1\"},\"subject\":{\"external_ref\":{\"namespace\":\"DEMOGRAPHIC\",\"type\":\"PERSON\",\"id\":{\"_type\":\"HIER_OBJECT_ID\",\"value\":\"00013D2EFD8E45D1\"}}},\"other_details\":{\"_type\":\"ITEM_TREE\",\"name\":{\"_type\":\"DV_TEXT\",\"va\"[truncated 496 chars]; line: 1, column: 996]","status":"Bad Request"}
	at org.ehrbase.client.openehrclient.defaultrestclient.DefaultRestClient.checkStatus(DefaultRestClient.java:283)
	at org.ehrbase.client.openehrclient.defaultrestclient.DefaultRestClient.httpPut(DefaultRestClient.java:190)
	at org.ehrbase.client.openehrclient.defaultrestclient.DefaultRestClient.httpPut(DefaultRestClient.java:175)
	at es.veratech.synpufConverter.client.CustomEhrClient.createEhr(CustomEhrClient.java:21)
	at es.veratech.synpufConverter.client.CustomEhrEndpoint.createEhr(CustomEhrEndpoint.java:25)
	at es.veratech.synpufConverter.client.OpenEHRClient.createEHRFromParams(OpenEHRClient.java:71)
	at es.veratech.synpufConverter.OpenEHRClientTest.testCreateEHR(OpenEHRClientTest.java:28)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants