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);
        }
        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);
        }
 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;
 }