How split Value Complex data in openmrs and spring?

38 Views Asked by At

I am facing problem to split given string with | operator but its work with other special glue . Here is my data: txt file |f3558100-f384-43a1-847e-8cafc747156b

1

There are 1 best solutions below

0
Pramod Kharade On BEST ANSWER

I had also faced same problem while spiting string with | operator. but | operator is exception case in java while spiting. You go like this it will be work for you because same problem i faced in opemmrs ValueComplex string split.

String valueData = obs1.getValueComplex();
String[] complexDataUuid = valueData.split("\\|");
String uuid = complexDataUuid[1];

So, You can get uuid in complexDataUuid[1]