Example #1
0
 public JsonResult GetAllPatientIDs()
 {
     ViewBag.DoctorName = HttpContext.Session.GetString(Globals.currentUserName);
     if (HttpContext.Session.GetString(Globals.currentDSPriK) == null || HttpContext.Session.GetString(Globals.currentDAPriK) == null)
     {
         return(Json("{}"));
     }
     else
     {
         var phns = _bigChainDbService.GetAllTypeIDs(AssetType.Patient);
         return(Json(phns));
     }
 }
 public JsonResult GetAllTypeIDs(string type)
 {
     if (HttpContext.Session.GetString(Globals.currentPSPubK) == null || HttpContext.Session.GetString(Globals.currentPAPubK) == null)
     {
         return(Json("{}"));
     }
     else
     {
         if (type == null || type == "")
         {
             return(Json("{}"));
         }
         AssetType assetType = type == "Doctor" ? AssetType.Doctor :
                               type == "Pharmacist" ? AssetType.Pharmacist : AssetType.MLT;
         var phns = _bigChainDbService.GetAllTypeIDs(assetType);
         return(Json(phns));
     }
 }