data migration issue from IPF2.x to IPF3.x

20 views
Skip to first unread message

yagnya...@gmail.com

unread,
Jan 17, 2021, 8:52:14 AM1/17/21
to ipf-user
Hi ,

we have some of customer who still uses our older patch of healthcare product which uses IPF 2.x,recently they wish to  migrate to our new release which uses IPF 3.5.4 .

problem is there is a huge change in xml data model from IPF 2.6.6 to IPF 3.5.4,could you please suggest what is the best way to migrate the data from old system to new system which will work on IPF 3.5.4 .

Thanks,
Yagnya 

Dmytro Rud

unread,
Jan 17, 2021, 10:29:34 AM1/17/21
to ipf-...@googlegroups.com
Hello Yagnya

Could you please elaborate on which XML data model do you mean?  XDS.a vs. XDS.b?  XDS simplified data model?  Spring context descriptors?  Something else?

Best regards
Dmytro


--
You received this message because you are subscribed to the Google Groups "ipf-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ipf-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipf-user/a2365ba8-1ddd-4ce5-b8d3-5fd5428a9845n%40googlegroups.com.

yagnya...@gmail.com

unread,
Jan 18, 2021, 12:40:22 PM1/18/21
to ipf-user
Hello Dmytro,

not entirely sure about the profile but here are some examples which is different in 2.6.6 and 3.5.4

attributes are not same in 2.6.6 and 3.5.4
org.openehealth.ipf.commons.ihe.xds.core.metadata.ReferenceId


in 3.5.4 now Date and Time fields are Timestamp,where as in 2.6.6 the date and Time fields are String
package org.openehealth.ipf.commons.ihe.xds.core.metadata.DocumentEntry

namespace information has been changed from 2.6.6 to 3.5.4
ipf/commons/ihe/xds/src/main/java/org/openehealth/ipf/commons/ihe/xds/core/requests/package-info.java


these are some changes we are aware of for which generated xml data of 3.5.4 is different from 2.6.6

Thanks,
Yagnya

Dmytro Rud

unread,
Jan 18, 2021, 2:05:40 PM1/18/21
to ipf-...@googlegroups.com
Hello Yagnya

Ok, now I understand, you mean the simplified XDS data model.  In this case, a possible migration scenario would look like:
  1. In an application based on IPF 2.x:
    1. Parse the XML into an POJO of the IPF simplified XDS data model (old version).
    2. Convert this POJO into an instance of the corresponding ebXML JAXB stub class.
    3. Serialize the ebXML object and store it.
  2. In an application based on IPF 3.x:
    1. Parse the serialized ebXML object.
    2. Convert it into a POJO of the IPF simplified data model (new version).
    3. Serialize the POJO into XML and store it.

Best regards
Dmytro

yagnya dhal

unread,
Feb 8, 2021, 11:20:43 AM2/8/21
to ipf-...@googlegroups.com
Hi Dmytro,

I have been trying with the approach you have suggested,following are the details, could you please give me some pointer to proceed further in the right direction.

String iti18ServiceUrl ="http://localhost:8081/registry/services/xds-iti18";

FindDocumentsQuery findDocumentsQuery = new FindDocumentsQuery();
findDocumentsQuery.setPatientId(getPatientID());
findDocumentsQuery.setStatus(getAvailabilityStatus());

QueryRegistry queryRegistry = new QueryRegistry(findDocumentsQuery);
queryRegistry.setReturnType(QueryReturnType.LEAF_CLASS);
QueryResponse responseType = XDSClient.sendITI18(iti18ServiceUrl, queryRegistry);
after retrieving the document entries from the  QueryResponse  type  should I use a transformer to convert POJO into an instance of the corresponding ebXML JAXB stub class?
     eg:  EbXMLExtrinsicObject ebXML = transformer.toEbXML(documentEntry, objectLibrary);

  here my doubt is how do I serialize    EbXMLExtrinsicObject object since it's not serializable?may be I'am missing something in following the approach you have suggested please help.

Thanks,
Yagnya
   .









You received this message because you are subscribed to a topic in the Google Groups "ipf-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ipf-user/LmvEvh2tiOg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ipf-user+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ipf-user/CAHh9K-kDR6L0L4bKv%3DEm1qVf%2BiGasn6Lt%3Dkm__9eks4L_yr7GQ%40mail.gmail.com.

yagnya...@gmail.com

unread,
Feb 8, 2021, 10:21:54 PM2/8/21
to ipf-user
Hi Dmytro,
Here is the detail code snippet.

String iti18ServiceUrl ="http://localhost:8081/registry/services/xds-iti18";

FindDocumentsQuery findDocumentsQuery = new FindDocumentsQuery();
findDocumentsQuery.setPatientId(getPatientID());
findDocumentsQuery.setStatus(getAvailabilityStatus());

QueryRegistry queryRegistry = new QueryRegistry(findDocumentsQuery);
queryRegistry.setReturnType(QueryReturnType.LEAF_CLASS);
QueryResponse responseType = XDSClient.sendITI18(iti18ServiceUrl, queryRegistry);



objectLibrary = factory.createObjectLibrary();
EbXMLExtrinsicObject ebXML = documentEntryTransformer.toEbXML(responseType.getDocumentEntries().get(0),objectLibrary);

Following is the doubt I have

1 .is this the right way am I going?

2. this ebXML is from IPF2.6.6 xds simplified  data model, how do I serialize and store it in file system so that I can use it for deserialize and use it to create IPF 3.5.x xds simplified data model objects and store it in xml database ?



Thanks,
Yagnya

Dmytro Rud

unread,
Feb 12, 2021, 2:07:54 PM2/12/21
to ipf-...@googlegroups.com
Hello Yagnya

I meant something like this:

public String fromIpf2(QueryResponse responseType) {
QueryResponseTransformer transformer = new QueryResponseTransformer();
EbXMLQueryResponse30 ebXml = (EbXMLQueryResponse30) transformer.toEbXML(responseType);
AdhocQueryResponse internal = ebXml.getInternal();

JAXBContext jaxbContext = JAXBContext.newInstance(AdhocQueryResponse.class);
Marshaller marshaller = jaxbContext.createMarshaller();
StringWriter writer = new StringWriter();
marshaller.marshal(ebXml, writer);
return writer.toString();
}

public QueryResponse toIpf3(String s) {
InputStream inputStream = new ByteArrayInputStream(s.getBytes(StandardCharsets.UTF_8));

JAXBContext jaxbContext = JAXBContext.newInstance(AdhocQueryResponse.class);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
AdhocQueryResponse internal = (AdhocQueryResponse) unmarshaller.unmarshal(inputStream);
EbXMLQueryResponse30 ebXml = new EbXMLQueryResponse30(internal);

QueryResponseTransformer transformer = new QueryResponseTransformer();
return transformer.fromEbXML(ebXml);
}

Best regards
Dmytro


Reply all
Reply to author
Forward
0 new messages