source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/SubscriptionDteEjb/src/java/gov/hhs/fha/nhinc/subscription/dte/createNhinNotifyCdcBioPackageHelper.java@ 507

Last change on this file since 507 was 507, checked in by George Lilly, 15 years ago

NHIN gateway and adaptor for use on linux with VistA EHR and RPMS

File size: 1.7 KB
Line 
1/*
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
4 */
5package gov.hhs.fha.nhinc.subscription.dte;
6
7import gov.hhs.fha.nhinc.common.subscriptionb2overrideforcdc.NotifyCdcBioPackageType;
8import gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyCdcBioPackageResponseType;
9import javax.xml.bind.JAXBElement;
10import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType.Message;
11import org.oasis_open.docs.wsn.b_2.Notify;
12
13/**
14 *
15 * @author rayj
16 */
17public class createNhinNotifyCdcBioPackageHelper {
18
19 public static gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyCdcBioPackageResponseType createNhinNotifyCdcBioPackage(gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyCdcBioPackageRequestType request) {
20 CreateNhinNotifyCdcBioPackageResponseType response = new CreateNhinNotifyCdcBioPackageResponseType();
21
22 Notify nhinNotify = transformInternalSubscriptionItemToNhinNotifyHelper.transformInternalSubscriptionItemToNhinNotify(request.getSubscriptionItem());
23
24 NotifyCdcBioPackageType entityNotify = request.getNotify();
25 if (entityNotify != null && entityNotify.getNotificationMessage() != null && entityNotify.getNotificationMessage().size() >= 1 && entityNotify.getNotificationMessage().get(0).getMessage() != null) {
26 byte[] cdcBioPackage = entityNotify.getNotificationMessage().get(0).getMessage().getCdcBioPackagePayload();
27 Message nhinNotifyMessage = NotifyHelper.getMessage(nhinNotify);
28 NotifyHelper.AppendCdcBioPackage(nhinNotifyMessage, cdcBioPackage);
29 }
30
31 response.setNotify(nhinNotify);
32
33 return response;
34 }
35
36
37}
Note: See TracBrowser for help on using the repository browser.