コード例 #1
0
        public static List <Role> GenerateRoles(ProcedureType procedure)
        {
            List <Role> list = new List <Role>();

            if (procedure.AllowedAdministrator)
            {
                list.Add(Role.Administrator);
            }
            if (procedure.AllowedDataRecorder)
            {
                list.Add(Role.DataRecorder);
            }
            if (procedure.AllowedDoctor)
            {
                list.Add(Role.Doctor);
            }
            if (procedure.AllowedLaboratorian)
            {
                list.Add(Role.Laboratorian);
            }
            if (procedure.AllowedNurse)
            {
                list.Add(Role.Nurse);
            }

            return(list);
        }
コード例 #2
0
        public object Clone()
        {
            ProcedureType clone = new ProcedureType();

            clone.Id    = this.Id;
            clone.Name  = this.Name;
            clone.Wards = this.Wards;

            clone.AllowedAdministrator = this.AllowedAdministrator;
            clone.AllowedDataRecorder  = this.AllowedDataRecorder;
            clone.AllowedDoctor        = this.AllowedDoctor;
            clone.AllowedLaboratorian  = this.AllowedLaboratorian;
            clone.AllowedNurse         = this.AllowedNurse;

            return(clone);
        }
コード例 #3
0
 public Procedure(string createdTimestamp, string lastModifTimestamp, State state, List <ItemUsage> inventoryUsage,
                  int price, List <Attachment> attachments, string anamnesis, string diagnosis,
                  int duration, ProcedureType type, Ward ward, Employee resp)
 {
     this.CreatedTimestamp      = createdTimestamp;
     this.LastModifiedTimestamp = lastModifTimestamp;
     this.State          = state;
     this.InventoryUsage = inventoryUsage;
     this.Price          = price;
     this.Attachments    = attachments;
     this.Anamnesis      = anamnesis;
     this.Diagnosis      = diagnosis;
     this.Duration       = duration;
     this.ProcedureType  = type;
     this.Ward           = ward;
     this.Responsible    = resp;
 }