Guest User

Untitled

a guest
Jul 12th, 2021
26
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. API : encounter
  4. Post menthod
  5.  
  6. Request:
  7. {
  8. "patient": {
  9. "person": "51de2d4e-b8b7-4042-bba5-3f39383e82f0",
  10. "identifiers": [
  11. {
  12. "identifier": "1020061200101",
  13. "identifierType": "8d79403a-c2cc-11de-8d13-0010c6dffd0f",
  14. "location": "8d6c993e-c2cc-11de-8d13-0010c6dffd0f",
  15. "preferred": true
  16. }
  17. ]
  18. },
  19. "encounterType": {
  20. "name": "SMH_ASHA_SCREENING_3",
  21. "description": "SMH_ASHA_SCREENING_3"
  22. },
  23. "encounterDatetime": "2021-07-12T18:16:42.215Z",
  24. "obs":[{
  25. "person": "51de2d4e-b8b7-4042-bba5-3f39383e82f0",
  26. "obsDatetime": "2021-07-12T18:16:42.215Z",
  27. "concept": "ad09b9ee-2c63-4d88-a07e-952227b87ece",
  28. "encounter": "SMH_ASHA_SCREENING_3",
  29. "voided": 0,
  30. "value": "1020061200101",
  31. "status": "PRELIMINARY",
  32. "interpretation": "NORMAL"
  33. }]
  34. }
  35. Error:
  36.  
  37. [message] => [obs on class org.openmrs.Encounter]
  38. [code] => org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource:805
  39. [detail] => org.openmrs.module.webservices.rest.web.response.ConversionException: obs on class org.openmrs.Encounter
  40. at
  41. org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:805)
  42. at
  43. org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setConvertedProperties(BaseDelegatingResource.java:672)
  44. at org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource.convert(DelegatingCrudResource.java:107)
  45. at org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource.create(DelegatingCrudResource.java:76)
  46. at org.openmrs.module.webservices.rest.web.v1_0.controller.MainResourceController.create(MainResourceController.java:92)
  47. at sun.reflect.GeneratedMethodAccessor1100.invoke(Unknown Source)
  48. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  49. at java.lang.reflect.Method.invoke(Method.java:498)
  50. at
  51. org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:177)
  52. at
  53. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:446)
  54. at
  55. org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:434)
  56. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943)
  57. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877)
  58. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966)
  59. at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868)
  60. at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
  61. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842)
  62. at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
  63. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
  64. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  65. at org.openmrs.module.web.filter.ForcePasswordChangeFilter.doFilter(ForcePasswordChangeFilter.java:60)
  66. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  67. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  68. at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
  69. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  70. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  71. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:73)
  72. at org.openmrs.web.filter.GZIPFilter.doFilterInternal(GZIPFilter.java:65)
  73. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  74. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
  75. at org.openmrs.module.webservices.rest.web.filter.AuthorizationFilter.doFilter(AuthorizationFilter.java:105)
  76. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
  77. at org.openmrs.module.webservices.rest.web.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:64)
  78. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
  79. at org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:82)
  80. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  81. at org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:71)
  82. at org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:57)
  83. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  84. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  85. at org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:109)
  86. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  87. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  88. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  89. at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)
  90. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  91. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  92. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  93. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
  94. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  95. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  96. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
  97. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  98. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  99. at org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:107)
  100. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  101. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  102. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
  103. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
  104. at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
  105. at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
  106. at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
  107. at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
  108. at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:490)
  109. at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
  110. at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
  111. at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
  112. at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
  113. at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
  114. at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
  115. at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
  116. at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:836)
  117. at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1839)
  118. at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
  119. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
  120. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
  121. at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
  122. at java.lang.Thread.run(Thread.java:748)
  123. Caused by: org.openmrs.module.webservices.rest.web.response.ConversionException: voided on class org.openmrs.Obs
  124. at
  125. org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:805)
  126. at org.openmrs.module.webservices.rest.web.ConversionUtil.convertMap(ConversionUtil.java:323)
  127. at org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:273)
  128. at org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:213)
  129. at
  130. org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:791)
  131. ... 77 more
  132. Caused by: org.openmrs.module.webservices.rest.web.response.ConversionException: Don't know how to convert from class
  133. java.lang.Integer to class java.lang.Boolean
  134. at org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:285)
  135. at org.openmrs.module.webservices.rest.web.ConversionUtil.convert(ConversionUtil.java:155)
  136. at
  137. org.openmrs.module.webservices.rest.web.resource.impl.BaseDelegatingResource.setProperty(BaseDelegatingResource.java:800)
  138. ... 81 more
  139.  
  140. )
  141.  
  142. )
  143.  
  144. )
  145.  
  146.  
  147.  
RAW Paste Data