test parent
This commit is contained in:
parent
84ab5e79d6
commit
f97e643ac1
20 changed files with 155 additions and 264 deletions
|
|
@ -99,14 +99,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
||||
|
|
@ -228,7 +224,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementAppointments = placementAppointments
|
||||
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||
.Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,14 +98,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementAppointments = await _context.PlacementAppointments.AsQueryable()
|
||||
|
|
@ -222,7 +218,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementAppointments = placementAppointments
|
||||
.Where(x => x.child1DnaId == nodeId).ToList();
|
||||
.Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -99,14 +99,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementOfficers = await _context.PlacementOfficers.AsQueryable()
|
||||
|
|
@ -183,7 +179,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementOfficers = placementOfficers
|
||||
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||
.Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,14 +100,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementReceives = await _context.PlacementReceives.AsQueryable()
|
||||
|
|
@ -221,7 +217,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementReceives = placementReceives
|
||||
.Where(x => (x.child1DnaId == nodeId) || (x.CreatedUserId == UserId)).ToList();
|
||||
.Where(x => x.rootDnaId == nodeId && x.child1DnaId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,14 +100,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementRepatriations = await _context.PlacementRepatriations.AsQueryable()
|
||||
|
|
@ -188,7 +184,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementRepatriations = placementRepatriations
|
||||
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||
.Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
|
|
@ -192,14 +192,10 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
? profileAdmin?.RootDnaId
|
||||
: "";
|
||||
}
|
||||
else if (role == "ROOT")
|
||||
else if (role == "ROOT" && role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.RootDnaId;
|
||||
}
|
||||
else if (role == "PARENT")
|
||||
{
|
||||
nodeId = profileAdmin?.Child1DnaId;
|
||||
}
|
||||
|
||||
var node = profileAdmin?.Node;
|
||||
var placementTransfers = await _context.PlacementTransfers.AsQueryable()
|
||||
|
|
@ -274,7 +270,7 @@ namespace BMA.EHR.Placement.Service.Controllers
|
|||
else if (role == "PARENT")
|
||||
{
|
||||
placementTransfers = placementTransfers
|
||||
.Where(x => x.child1DnaOldId == nodeId).ToList();
|
||||
.Where(x => x.rootDnaOldId == nodeId && x.child1DnaOldId != null).ToList();
|
||||
}
|
||||
else if (role == "NORMAL")
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue