|
|
|
@@ -27,8 +27,7 @@ import (
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
const (
|
|
|
|
const (
|
|
|
|
zipcodeTrimLength = 5
|
|
|
|
zipcodeTrimLength = 5
|
|
|
|
enableZipParticipationCheck = true
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
@@ -409,6 +408,14 @@ func (c *controller) handleMember(ctx echo.Context) error {
|
|
|
|
eligibility.ServiceInfo.DateOfService = time.Now()
|
|
|
|
eligibility.ServiceInfo.DateOfService = time.Now()
|
|
|
|
eligibility.ServiceInfo.ServiceTypeCodes = []string{"30"}
|
|
|
|
eligibility.ServiceInfo.ServiceTypeCodes = []string{"30"}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
resp, err := c.bcbsi.BXE.Get271(eligibility)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
fmt.Println("Eligibility Not Found or Error: ", err.Error())
|
|
|
|
|
|
|
|
return routeutils.ResponseAPINotEligibleError(ctx)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//This part is emulating eligibility check for testing purposes
|
|
|
|
//This part is emulating eligibility check for testing purposes
|
|
|
|
client := &http.Client{}
|
|
|
|
client := &http.Client{}
|
|
|
|
eligibilityJson, err := json.Marshal(eligibility)
|
|
|
|
eligibilityJson, err := json.Marshal(eligibility)
|
|
|
|
@@ -461,11 +468,10 @@ func (c *controller) handleMember(ctx echo.Context) error {
|
|
|
|
trimmedZipcode = cleanZipcode[:zipcodeTrimLength]
|
|
|
|
trimmedZipcode = cleanZipcode[:zipcodeTrimLength]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if enableZipParticipationCheck {
|
|
|
|
_, err = c.svc.Zipcodes.GetByParticipatingZipcode(trimmedZipcode)
|
|
|
|
_, err = c.svc.Zipcodes.GetByParticipatingZipcode(trimmedZipcode)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return routeutils.ResponseAPINotEligibleWithMessageError(ctx, "Member's Home zipcode, "+trimmedZipcode+", is not currently eligible for participation in this program")
|
|
|
|
return routeutils.ResponseAPINotEligibleWithMessageError(ctx, "Member's Home zipcode, "+trimmedZipcode+", is not currently eligible for participation in this program")
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
googleMapsAPI, err := maps.NewClient(maps.WithClientIDAndSignature("gme-bluecrossandblue1", "msqgD-jdqCyR0M_1u5C1HION5iI="))
|
|
|
|
googleMapsAPI, err := maps.NewClient(maps.WithClientIDAndSignature("gme-bluecrossandblue1", "msqgD-jdqCyR0M_1u5C1HION5iI="))
|
|
|
|
|