当前位置: 首页>>代码示例>>C#>>正文


C# Patient类代码示例

本文整理汇总了C#中Patient的典型用法代码示例。如果您正苦于以下问题:C# Patient类的具体用法?C# Patient怎么用?C# Patient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Patient类属于命名空间,在下文中一共展示了Patient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Connected

	public override bool Connected (){
		if (patient == null)
			patient = Component.FindObjectOfType(typeof(Patient)) as Patient;
		if (patient == null) return false;
		return(patient.GetAttribute("autobpplaced")=="True" && 
			patient.GetAttribute ("cufferror")!="True");
	}
开发者ID:MedStarSiTEL,项目名称:UnityTrauma,代码行数:7,代码来源:SystolicGraph.cs

示例2: AddPatient

    public void AddPatient(Patient patient, string userName)
    {
        using (TransactionScope scope = new TransactionScope())
        {
            using (var dataContext = new HealthReunionEntities())
            {
                // Add provider enity
                dataContext.Patients.Add(patient);

                // Save changes so that it will insert records into database.
                dataContext.SaveChanges();

                var user = new User();
                user.UserName = userName;
                user.Password = "Password1";

                user.PatientId = patient.PatientId;

                // Add user entity
                dataContext.Users.Add(user);

                dataContext.SaveChanges();

                // Complete the transaction if everything goes well.
                scope.Complete();
            }
        }
    }
开发者ID:ranjancse,项目名称:HealthReunionPatientPoral,代码行数:28,代码来源:PatientRepository.cs

示例3: Insert

 ///<summary>Inserts one Patient into the database.  Returns the new priKey.</summary>
 internal static long Insert(Patient patient)
 {
     if(DataConnection.DBtype==DatabaseType.Oracle) {
         patient.PatNum=DbHelper.GetNextOracleKey("patient","PatNum");
         int loopcount=0;
         while(loopcount<100){
             try {
                 return Insert(patient,true);
             }
             catch(Oracle.DataAccess.Client.OracleException ex){
                 if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
                     patient.PatNum++;
                     loopcount++;
                 }
                 else{
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else {
         return Insert(patient,false);
     }
 }
开发者ID:nampn,项目名称:ODental,代码行数:26,代码来源:PatientCrud.cs

示例4: CreatePatient

        /// <summary>
        /// Creates a patient object from the given data.
        /// </summary>
        /// <param name="last">Patient's last name</param>
        /// <param name="middle">Patient's middle initial</param>
        /// <param name="first">Patient's first name</param>
        /// <param name="birthdate">Patient's birthdate</param>
        /// <param name="gender">Patient's gender</param>
        /// <param name="ssn">Patient's ssn</param>
        /// <param name="addr">Patient's address</param>
        /// <param name="city">Patient's city</param>
        /// <param name="state">Patient's state</param>
        /// <param name="zip">Patient's zip</param>
        /// <param name="phone">Patient's phone</param>
        /// <returns>A patient object with the specified information upon creation, otherwise null</returns>
        public static Patient CreatePatient(string last, char middle, string first, string birthdate, char gender, string ssn, string addr, string city, string state, string zip, string phone)
        {
            Patient newPatient = new Patient();
            try
            {
                newPatient.LastName = last;
                newPatient.MiddleInitial = middle;
                newPatient.FirstName = first;
                newPatient.DateOfBirth = DateTime.Parse(birthdate);
                newPatient.Gender = gender;
                newPatient.Ssn = ssn;
                newPatient.Address = addr;
                newPatient.City = city;
                newPatient.State = state;
                newPatient.Zip = zip;
                newPatient.Phone = phone;

                return newPatient;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, ex.GetType().ToString(), MessageBoxButtons.OK);
            }

            return null;
        }
开发者ID:mwilian,项目名称:healthcaresystem,代码行数:41,代码来源:PatientController.cs

示例5: Start

    // Use this for initialization
    protected override void Start()
    {
        base.Start();

        patient = Component.FindObjectOfType(typeof(Patient)) as Patient;
		parser = GetComponent<VitalsParser>();
    }
开发者ID:MedStarSiTEL,项目名称:UnityTrauma,代码行数:8,代码来源:O2Graph.cs

示例6: PatientHistory

 public PatientHistory(Patient patient)
 {
     InitializeComponent();
     this.CenterToScreen();
     this.patient = patient;
     FillTabe();
 }
开发者ID:zsolt5553,项目名称:Public-hospital,代码行数:7,代码来源:PatientHistory.cs

示例7: AddACOfferings

 public static void AddACOfferings(ref Hashtable offerings, ref Patient patient)
 {
     if (patient.ACInvOffering != null)
         patient.ACInvOffering = (Offering)offerings[patient.ACInvOffering.OfferingID];
     if (patient.ACPatOffering != null)
         patient.ACPatOffering = (Offering)offerings[patient.ACPatOffering.OfferingID];
 }
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:7,代码来源:PatientDB.cs

示例8: CreatePatient

		public static Patient CreatePatient(string mrn)
        {
            Patient patient = new Patient();
            PatientProfile profile = new PatientProfile(
                new PatientIdentifier(mrn, new InformationAuthorityEnum("UHN", "UHN", "")),
                null,
                new HealthcardNumber("1111222333", new InsuranceAuthorityEnum("OHIP", "OHIP", ""), null, null),
                new PersonName("Roberts", "Bob", null, null, null, null),
                DateTime.Now - TimeSpan.FromDays(4000),
                Sex.M,
                new SpokenLanguageEnum("en", "English", null),
                new ReligionEnum("X", "unknown", null),
                false,
				null,
                null,
                null,
                null,
                null,
                null,
                null,
                patient
                );

            patient.AddProfile(profile);

            return patient;
        }
开发者ID:nhannd,项目名称:Xian,代码行数:27,代码来源:TestPatientFactory.cs

示例9: Insert

        public void Insert(Guid Guid, Guid ServerPartitionGUID, string PatientsName, string PatientId,
                           string IssuerOfPatientId, int NumberOfPatientRelatedStudies, int NumberOfPatientRelatedSeries,
                           int NumberOfPatientRelatedInstances, string SpecificCharacterSet)
        {
            var item = new Patient();

            item.Guid = Guid;

            item.ServerPartitionGUID = ServerPartitionGUID;

            item.PatientsName = PatientsName;

            item.PatientId = PatientId;

            item.IssuerOfPatientId = IssuerOfPatientId;

            item.NumberOfPatientRelatedStudies = NumberOfPatientRelatedStudies;

            item.NumberOfPatientRelatedSeries = NumberOfPatientRelatedSeries;

            item.NumberOfPatientRelatedInstances = NumberOfPatientRelatedInstances;

            item.SpecificCharacterSet = SpecificCharacterSet;


            item.Save(UserName);
        }
开发者ID:khaha2210,项目名称:radio,代码行数:27,代码来源:PatientController.cs

示例10: RegisterPatient

 public RegisterPatient(int register_patient_id, int organisation_id, int patient_id, DateTime register_patient_date_added)
 {
     this.register_patient_id = register_patient_id;
     this.organisation = new Organisation(organisation_id);
     this.patient = new Patient(patient_id);
     this.register_patient_date_added = register_patient_date_added;
 }
开发者ID:nblaurenciana-md,项目名称:Websites,代码行数:7,代码来源:RegisterPatient.cs

示例11: GetOpenQueries

        public void GetOpenQueries()
        {
            //Arrange
            var dataStorage = new Mock<IDataStorage>();
            var clinic = new Clinic {Caption = "Clinic1"};
            var doctor1 = new User {FirstName = "DoctorFirst1", LastName = "DoctorLast1", Clinic = clinic};
            var doctor2 = new User {FirstName = "DoctorFirst2", LastName = "DoctorLast2", Clinic = clinic};
            var patient1 = new Patient {PatientNumber = 11, Doctor = doctor1};
            var patient2 = new Patient {PatientNumber = 12, Doctor = doctor2};
            var visit1 = new Visit {Caption = "Visit1", Patient = patient1};
            var visit2 = new Visit {Caption = "Visit2", Patient = patient2};
            var form1 = new Form {FormType = FormType.Happiness, Visit = visit1};
            var form2 = new Form {FormType = FormType.Demographics, Visit = visit2};
            var question1 = new Question {Form = form1};
            var question2 = new Question {Form = form2};
            var query1 = new Query {Id = 1, QueryText = "Text1", Question = question1};
            var query2 = new Query {Id = 2, QueryText = "Text2", AnswerText = "Answer1", Question = question2};

            var repository = new QueryRepository(dataStorage.Object);
            dataStorage.Setup(ds => ds.GetData<Query>()).Returns(new List<Query> {query1, query2});

            //Act
            var result = repository.GetOpenQueries();

            //Assert
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Count(), Is.EqualTo(1));
            var query = result.ToList()[0];
            Assert.That(query.FormType, Is.EqualTo(FormType.Happiness));
            Assert.That(query.ClinicName, Is.EqualTo("Clinic1"));
            Assert.That(query.DoctorName, Is.EqualTo("DoctorLast1"));
            Assert.That(query.QuestionText, Is.EqualTo("Text1"));
            Assert.That(query.PatientNumber, Is.EqualTo(11));
            Assert.That(query.VisitName, Is.EqualTo("Visit1"));
        }
开发者ID:vituniversitycse,项目名称:ClinicalStudy,代码行数:35,代码来源:QueryRepositoryTest.cs

示例12: BaseInit

	protected void BaseInit(int damageOnInit, int damagePerTick, int tickExtraDelaySeconds, int tickRepeatRate){
		this.damagePerTick = damagePerTick;
		this.damageOnInit = damageOnInit;
		p = Camera.main.gameObject.GetComponent<Patient>();
		InvokeRepeating("doDamage",tickExtraDelaySeconds,tickRepeatRate);
		damageOnSpawn();
	}
开发者ID:robert-irribarren,项目名称:TraumaOR,代码行数:7,代码来源:BaseAttack.cs

示例13: Main

	public static int Main() {
		Patient bob = new Patient();
		bob["age"] = 32.0;
		if ((bool)bob["dead"])
			return 1;
		return 0;
	}
开发者ID:Zman0169,项目名称:mono,代码行数:7,代码来源:indexer.cs

示例14: AddPatient

    public void AddPatient(Patient patient, string userName, string defaultPassword)
    {
        using (TransactionScope scope = new TransactionScope())
        {
            using (var dataContext = new HealthReunionEntities())
            {
                if (CheckIfUserNameExists(userName))
                    throw new Exception("User name already exist");

                // Add provider enity
                dataContext.Patients.Add(patient);

                // Save changes so that it will insert records into database.
                dataContext.SaveChanges();

                var user = new User();
                user.UserName = userName;
                user.Password = defaultPassword;

                user.PatientId = patient.PatientId;
                user.IsDefaultPassword = true;

                // Add user entity
                dataContext.Users.Add(user);

                dataContext.SaveChanges();

                // Complete the transaction if everything goes well.
                scope.Complete();
            }
        }
    }
开发者ID:nagyist,项目名称:ranjance26-HealthReunionProviderPortal,代码行数:32,代码来源:PatientRepository.cs

示例15: Announce

 public ActionResult Announce( String Command,Patient P)
 {
     String HostName = Dns.GetHostName();
     String MyIP = Dns.GetHostByName(HostName).AddressList[0].ToString();
     Patient curPatient = new Patient();
     var counter = (from r in db.IPs
                    where r.IP_Address == MyIP
                    select r.Name);
     counter.Take(1);
     foreach (var item in counter)
     {
         ViewBag.CounterName = item;
     }
     var Patientinfo = (from r in db.Patients
                        where r.PatientId == P.PatientId
                        select r).Single();
     if ((Patientinfo.Status == "NEW"|| Patientinfo.Status=="MISSED") && Command!="CALL")
         return View(Patientinfo);
     Patientinfo.Status = Command;
     db.SaveChanges();
     Patientinfo.IP = MyIP;
     db.SaveChanges();
     Patientinfo.TimeStamp = DateTime.Now;
     db.SaveChanges();
     ModelState.Clear();
     if (Command != "CALL")
     {
         return RedirectToAction("PatientSelection");
     }
     return View(Patientinfo);
 }
开发者ID:poorblogger,项目名称:QMS,代码行数:31,代码来源:AnnouncementController.cs


注:本文中的Patient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。