本文整理汇总了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");
}
示例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();
}
}
}
示例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);
}
}
示例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;
}
示例5: Start
// Use this for initialization
protected override void Start()
{
base.Start();
patient = Component.FindObjectOfType(typeof(Patient)) as Patient;
parser = GetComponent<VitalsParser>();
}
示例6: PatientHistory
public PatientHistory(Patient patient)
{
InitializeComponent();
this.CenterToScreen();
this.patient = patient;
FillTabe();
}
示例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];
}
示例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;
}
示例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);
}
示例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;
}
示例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"));
}
示例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();
}
示例13: Main
public static int Main() {
Patient bob = new Patient();
bob["age"] = 32.0;
if ((bool)bob["dead"])
return 1;
return 0;
}
示例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();
}
}
}
示例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);
}