public static CheckPolicyRequestType transformSubscribeToCheckPolicy(SubscribeEventType event) {
    CheckPolicyRequestType genericPolicyRequest = new CheckPolicyRequestType();
    RequestType request = new RequestType();
    if (InboundOutboundChecker.isInbound(event.getDirection())) {
      request.setAction(ActionHelper.actionFactory(ActionInValue));
    }
    if (InboundOutboundChecker.isOutbound(event.getDirection())) {
      request.setAction(ActionHelper.actionFactory(ActionOutValue));
    }

    SubjectHelper subjHelp = new SubjectHelper();
    SubjectType subject =
        subjHelp.subjectFactory(event.getSendingHomeCommunity(), event.getMessage().getAssertion());
    request.getSubject().add(subject);

    AdhocQueryRequest adhocReq = new AdhocQueryRequest();
    AdhocQueryType adhocQuery = null;
    adhocQuery = getAdhocQuery(event.getMessage().getSubscribe());
    adhocReq.setAdhocQuery(adhocQuery);
    String patId = AdhocQueryTransformHelper.extractPatientIdentifierId(adhocReq);
    String assignAuth =
        AdhocQueryTransformHelper.extractPatientIdentifierAssigningAuthority(adhocReq);

    ResourceType resource = new ResourceType();
    AttributeHelper attrHelper = new AttributeHelper();

    if (NullChecker.isNotNullish(assignAuth)) {
      resource
          .getAttribute()
          .add(
              attrHelper.attributeFactory(
                  PatientAssigningAuthorityAttributeId, Constants.DataTypeString, assignAuth));
    }

    if (NullChecker.isNotNullish(patId)) {
      String sStrippedPatientId = PatientIdFormatUtil.parsePatientId(patId);
      LOG.debug("transformSubscribeToCheckPolicy: sStrippedPatientId = " + sStrippedPatientId);
      resource
          .getAttribute()
          .add(
              attrHelper.attributeFactory(
                  PatientIdAttributeId, Constants.DataTypeString, sStrippedPatientId));
    }

    setTopic(event, resource);

    request.getResource().add(resource);

    AssertionHelper assertHelp = new AssertionHelper();
    assertHelp.appendAssertionDataToRequest(request, event.getMessage().getAssertion());

    genericPolicyRequest.setRequest(request);
    genericPolicyRequest.setAssertion(event.getMessage().getAssertion());
    return genericPolicyRequest;
  }