[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.subscription.dte;
|
---|
| 6 |
|
---|
| 7 | import gov.hhs.fha.nhinc.common.subscription.SubscriptionItemType;
|
---|
| 8 | import gov.hhs.fha.nhinc.common.subscriptionb2overridefordocuments.NotifyDocumentType;
|
---|
| 9 | import gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyDocumentResponseType;
|
---|
| 10 | import gov.hhs.fha.nhinc.common.subscriptiondte.CreateNhinNotifyDocumentRequestType;
|
---|
| 11 | import gov.hhs.fha.nhinc.nhinclib.NullChecker;
|
---|
| 12 | import java.util.List;
|
---|
| 13 | import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType;
|
---|
| 14 | import org.oasis_open.docs.wsn.b_2.NotificationMessageHolderType.Message;
|
---|
| 15 | import org.oasis_open.docs.wsn.b_2.Notify;
|
---|
| 16 | import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType;
|
---|
| 17 | import ihe.iti.xds_b._2007.RetrieveDocumentSetRequestType.DocumentRequest;
|
---|
| 18 |
|
---|
| 19 | /**
|
---|
| 20 | *
|
---|
| 21 | * @author rayj
|
---|
| 22 | */
|
---|
| 23 | public 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 | }
|
---|