Upstream sync
This commit is contained in:
@@ -27,14 +27,13 @@ func (c *visitRepo) getProfileQuery(user entity.User) (query string, where strin
|
||||
switch p.Key {
|
||||
case "AD", "BCBSIAD", "BDCAD", "PLANAD":
|
||||
return
|
||||
case "SP", "SPT":
|
||||
case "SP", "SPT", "VIRPT":
|
||||
switch p.Organization.Type.Key {
|
||||
case "techsupport", "bcbsi", "bcbsa", "plan":
|
||||
return
|
||||
case "provider":
|
||||
query = ` INNER JOIN viw_visit_provider f
|
||||
ON f.visit_id = a.visit_id `
|
||||
where = fmt.Sprintf(` AND (f.organization_uuid = '%s' OR f.parent_organization_uuid = '%s') `, p.Organization.UUID, p.Organization.UUID)
|
||||
query = ` INNER JOIN viw_visit_provider AS o ON o.visit_id = a.visit_id `
|
||||
where = fmt.Sprintf(` AND ( o.organization_uuid = '%s' OR o.parent_organization_uuid = '%s' ) `, p.Organization.UUID, p.Organization.UUID)
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -85,17 +84,17 @@ func (c *visitRepo) getQuery() string {
|
||||
IFNULL(f.provider_muk_id, '') provider_muk_id,
|
||||
IFNULL(f.provider_name, '') provider_name
|
||||
FROM
|
||||
tab_visit a
|
||||
INNER JOIN tab_visit_status b
|
||||
tab_visit AS a
|
||||
INNER JOIN tab_visit_status AS b
|
||||
ON a.visit_status_id = b.visit_status_id
|
||||
INNER JOIN tab_user c
|
||||
INNER JOIN tab_user AS c
|
||||
ON c.user_id = a.user_id
|
||||
INNER JOIN tab_user d
|
||||
INNER JOIN tab_user AS d
|
||||
ON d.user_id = a.created_user_id
|
||||
INNER JOIN tab_trip_type e
|
||||
INNER JOIN tab_trip_type AS e
|
||||
ON e.trip_type_id = a.trip_type_id
|
||||
INNER JOIN tab_provider f
|
||||
ON f.provider_id = a.provider_id `
|
||||
INNER JOIN tab_provider AS f
|
||||
ON f.provider_id = a.provider_id `
|
||||
}
|
||||
|
||||
func (c *visitRepo) GetAll(user entity.User) ([]entity.Visit, error) {
|
||||
@@ -205,6 +204,5 @@ func (c *visitRepo) Create(visit entity.Visit) (entity.Visit, error) {
|
||||
return retVal, err
|
||||
}
|
||||
|
||||
fmt.Println("Visit ID: ", retVal.ID)
|
||||
return retVal, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user