source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/SubscriptionDteEjb/src/java/gov/hhs/fha/nhinc/subscription/dte/CreateAgencyNotifyHelper.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: 3.6 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
7//import gov.hhs.fha.nhinc.subscription.*;
8//import gov.hhs.fha.nhinc.subscription_b_2_overridefordocuments.NotificationMessageHolderType.Message;
9//import gov.hhs.fha.nhinc.subscription_b_2_overridefordocuments.NotifyDocumentType;
10//import gov.hhs.fha.nhinc.subscriptiondte.*;
11//import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType;
12//import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType.DocumentRequest;
13//import java.util.List;
14//import javax.xml.bind.JAXBElement;
15//import javax.xml.ws.wsaddressing.W3CEndpointReference;
16//import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
17//import org.oasis_open.docs.wsn.b_2.Notify;
18
19/**
20 *
21 * @author rayj
22 */
23public class CreateAgencyNotifyHelper {
24
25 private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(CreateAgencyNotifyHelper.class);
26
27// public static NotifyOfDocumentType createAgencyNotifyDocument(CreateAgencyNotifyDocumentRequestMessage createNotifyRequest) {
28// NotifyOfDocumentType agencyNotifyMessage = new NotifyOfDocumentType();
29// NotifyDocumentType agencyNotify = new NotifyDocumentType();
30// agencyNotifyMessage.setNotify(agencyNotify);
31//
32// gov.hhs.fha.nhinc.subscription_b_2_overridefordocuments.NotificationMessageHolderType agencyNotificationHolder = new gov.hhs.fha.nhinc.subscription_b_2_overridefordocuments.NotificationMessageHolderType();
33// agencyNotify.getNotificationMessage().add(agencyNotificationHolder);
34//
35// Notify nhinNotify = createNotifyRequest.getNotify();
36// NotificationMessageHolderType notificationMessageHolder = NotifyHelper.getNotificationMessageHolder(nhinNotify);
37//
38// log.info("getting documents");
39// RetrieveDocumentSetRequestType documents = getDocuments(nhinNotify);
40// log.info("(documents==null)=" + (documents == null));
41// if (documents != null) {
42// log.info("(documents.getDocumentRequest().size())=" + (documents.getDocumentRequest().size()));
43// }
44// Message agencyInnerMessage = new Message();
45// agencyNotificationHolder.setMessage(agencyInnerMessage);
46// agencyInnerMessage.setRetrieveDocumentSetRequest(documents);
47//
48// W3CEndpointReference nhinSubscriptionReference = SubscriptionReferenceHelper.createNhinSubscriptionReference(createNotifyRequest.getSubscriptionReference());
49// agencyNotificationHolder.setSubscriptionReference(nhinSubscriptionReference);
50//
51// return agencyNotifyMessage;
52// }
53//
54// private static RetrieveDocumentSetRequestType getDocuments(Notify nhinNotify) {
55// RetrieveDocumentSetRequestType documentInfos = null;
56//
57// NotificationMessageHolderType notificationMessageHolder = NotifyHelper.getNotificationMessageHolder(nhinNotify);
58// Object anyItem = notificationMessageHolder.getMessage().getAny();
59// if (anyItem instanceof JAXBElement) {
60// JAXBElement jbElement = (JAXBElement) anyItem;
61// Object jbElementValue = jbElement.getValue();
62// if (jbElementValue instanceof RetrieveDocumentSetRequestType) {
63// documentInfos = (RetrieveDocumentSetRequestType) jbElementValue;
64// }
65// } else if (anyItem instanceof ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType) {
66// documentInfos = (RetrieveDocumentSetRequestType) anyItem;
67// } else {
68// log.info("unhandled anyItem in getDocuments() => " + anyItem);
69// }
70// return documentInfos;
71// }
72}
Note: See TracBrowser for help on using the repository browser.