source: ccr/trunk/nhin-vista/projects/NHINC/Current/Product/Production/Gateway/SubscriptionDteEjb/src/java/gov/hhs/fha/nhinc/subscription/dte/CreateNhinNotifyDocumentHelper.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.9 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.subscription.SubscriptionItemType;
8import gov.hhs.fha.nhinc.common.subscriptionb2overridefordocuments.NotifyDocumentType;
9import gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyDocumentResponseType;
10import gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyDocumentRequestType;
11import gov.hhs.fha.nhinc.nhinclib.NullChecker;
12import java.util.List;
13import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
14import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType.Message;
15import org.oasis_open.docs.wsn.b_2.Notify;
16import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType;
17import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType.DocumentRequest;
18
19/**
20 *
21 * @author rayj
22 */
23public class CreateNhinNotifyDocumentHelper {
24
25 public static CreateNhinNotifyDocumentResponseType createNhinNotifyDocument(CreateNhinNotifyDocumentRequestType request) {
26 CreateNhinNotifyDocumentResponseType response = new CreateNhinNotifyDocumentResponseType();
27
28 NotifyDocumentType entityNotify = request.getNotify();
29 Notify nhinNotify = transformInternalSubscriptionItemToNhinNotifyHelper.transformInternalSubscriptionItemToNhinNotify(request.getSubscriptionItem());
30
31 Message nhinNotifyMessage = NotifyHelper.getMessage(nhinNotify);
32 RetrieveDocumentSetRequestType retrieveDocumentSetRequest = ExtractDocumentSetRequest(entityNotify);
33 NotifyHelper.AppendRetrieveDocumentSetRequest(nhinNotifyMessage, retrieveDocumentSetRequest);
34
35 response.setNotify(nhinNotify);
36
37 return response;
38 }
39
40 private static RetrieveDocumentSetRequestType ExtractDocumentSetRequest(NotifyDocumentType entityNotify) {
41 return transformEntityNotifyDocumentToSubscriptionCriteriaHelper.getDocumentSetRequest(entityNotify);
42 }
43}
Note: See TracBrowser for help on using the repository browser.