Unable to load Demo Patients in RefApp 2.13.0

Hi folks, :waving_hand:

I’m trying to load demo patient data in RefApp 2.13.0.

Here’s what I did:

  • Changed the global property referencedemodata.createDemoPatientsOnNextStartup to 20.
  • Restarted the server.

But when I search, no demo patients seem to have been loaded.

Looking at the logs (shared here :backhand_index_pointing_right: openmrs mvn openmrs-sdk:run[INFO] Scanning for projects...[INFO] [INFO] - - Pastebin.com), I see this error:

org.openmrs.api.ValidationException: 'obs id is null' failed to validate with reason: concept: Cannot be empty or null
at org.openmrs.validator.ValidateUtil.validate(ValidateUtil.java:88)
at org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:127)
...

This doesn’t seem related to the small change I made. Has anyone run into this issue with demo data loading in RefApp 2.13.0? Any pointers would be appreciated :folded_hands:

cc @dkayiwa @wikumc @mherman22

It’s likely that in the 2.x versions, the expected demo metadata is missing. As a result, the module won’t generate demo data as intended. You’ll need to identify which required metadata configs are missing in order to ensure the module functions correctly without errors.

Could this imply loading the concepts before however seems the missing ones are not also listed as per the error seems like for that random patient its null

The 1.x branch of the demodata module is compatible with RefApp 2.x. the 2.x branch of demodata is only compatible with RefApp 3.x. The 2.x RefApp should only ever ship with demodata 1.x, and so on.

Thanks @ibacher, that really clarifies things. However, I’m currently running Reference Demo Data Module 1.4.8.

On startup, the module fails to load, and even when I try starting it manually, no demo patients are created either.

Is the createDemoPatientsOnNextStartupset to some non-zero value? When the module doesn’t start, what error message does it give you?

Sure yes i set the referencedemodata.createDemoPatientsOnNextStartup to 20 .

and this is the error it gives as its starts

WARN - ModuleUtil.refreshApplicationContext(930) |2025-09-23T20:27:54,794| Unable to invoke started() method on the module's activator
org.openmrs.api.ValidationException: 'obs id is null' failed to validate with reason: concept: Cannot be empty or null
	at org.openmrs.validator.ValidateUtil.validate(ValidateUtil.java:88) ~[openmrs-api-2.5.9.jar:?]
	at org.openmrs.aop.RequiredDataAdvice.before(RequiredDataAdvice.java:127) ~[openmrs-api-2.5.9.jar:?]
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:55) ~[spring-aop-5.2.14.RELEASE.jar:5.2.14.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.14.RELEASE.jar:5.2.14.RELEASE]
	at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:56) ~[spring-aop-5.2.14.RELEASE.jar:5.2.14.RELEASE]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.14.RELEASE.jar:5.2.14.RELEASE]
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.14.RELEASE.jar:5.2.14.RELEASE]
	at com.sun.proxy.$Proxy300.saveObs(Unknown Source) ~[?:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createNumericObs(ReferenceDemoDataActivator.java:577) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVitalsObs(ReferenceDemoDataActivator.java:557) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVitalsEncounter(ReferenceDemoDataActivator.java:532) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoVisit(ReferenceDemoDataActivator.java:460) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatient(ReferenceDemoDataActivator.java:398) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.createDemoPatients(ReferenceDemoDataActivator.java:366) ~[referencedemodata.jar:?]
	at org.openmrs.module.referencedemodata.ReferenceDemoDataActivator.started(ReferenceDemoDataActivator.java:113) ~[referencedemodata.jar:?]
	at org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:922) ~[openmrs-api-2.5.9.jar:?]
	at org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:844) ~[openmrs-web-2.5.9.jar:?]
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:661) ~[openmrs-web-2.5.9.jar:?]
	at org.openmrs.web.Listener.performWebStartOfModules(Listener.java:641) ~[openmrs-web-2.5.9.jar:?]
	at org.openmrs.web.Listener.startOpenmrs(Listener.java:307) ~[openmrs-web-2.5.9.jar:?]
	at org.openmrs.web.WebDaemon$1.run(WebDaemon.java:42) ~[openmrs-web-2.5.9.jar:?]

Seems like you’re missing the metadata for the reference application, in that case.

1 Like

During the Platform call we were able to findout that concept with name Blood oxygen saturation is the metadata not found.

And this seems to be overtime to be updated to Oxygen saturation in Arterial blood

@ibacher do we need to update this concept fully specified name here

Seems like the proper fix for this

cc @akanter @dkayiwa

This is not the correct concept. The vital sign O2 Sat is: Arterial blood oxygen saturation (pulse oximeter) CIEL 5092 UUID 5092AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

BTW, the demo data needs to be refreshed with more modern CIEL concepts in general. Can we get a ticket for that too? I have done several runs through demo data that I have seen and produced a map to current CIEL concepts if that helps.

Sure let me go ahead and create the ticket and share it here

For clarity, I noticed that this concept was already updated in the 1.x branch here:

It looks like I should be using the latest snapshot of openmrs-module-referencedemodata 1.x (1.4.9-SNAPSHOT) to solve this missing concept.

@akanter, are there any other outdated concepts you’ve noticed that would be worth creating a separate ticket for?

I don’t have a comprehensive list of concepts being used for demo data, and presumably it has to be updated throughout the obs data and not just the dictionary or code… I do have a map for some of them that I can provide, but I’d like to address the dataset… thanks

1 Like