source: Scheduling/trunk/cs/bsdx0200GUISourceCode/Patient.cs@ 1110

Last change on this file since 1110 was 1110, checked in by Sam Habiel, 13 years ago

CGDocument:

CGDocumentManager:

CGView: (Changes to support printing of Appointment Slip)

  • Changed name and text of context menu to say "print appointment slip"
  • Logic to Print Appointment Slip

CustomPrinting.cs renamed to Printing.cs; old Printing.Cs removed.
DAppointPage:

  • New checkbox to request printing of Appointment Slip
  • Sex of patient now pulled and included in form.

DPatientLetter:

  • Redirected to use new Printing framework.

Patient:

Printing:

File size: 1.7 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace IndianHealthService.ClinicalScheduling
7{
8
9 /// <summary>
10 /// You guessed it.
11 /// </summary>
12 public enum Sex
13 {
14 Male, Female
15 };
16
17 /// <summary>
18 /// Puppet standing for a Real Patient
19 /// </summary>
20 public class Patient
21 {
22 public int DFN { get; set; }
23 public string Name { get; set; }
24 public Sex Sex;
25 public DateTime DOB { get; set; }
26 public string ID { get; set; }
27 public string HRN { get; set; }
28 public List<CGAppointment> Appointments { get; set; }
29 public string Street { get; set; }
30 public string City { get; set; }
31 public string State { get; set; }
32 public string Zip { get; set; }
33 public string Country { get; set; }
34 public string Email { get; set; }
35 public string HomePhone { get; set; }
36 public string WorkPHone { get; set; }
37 public string CellPhone { get; set; }
38 public TimeSpan Age
39 {
40 get
41 {
42 return (DateTime.Today - this.DOB);
43 }
44 }
45
46 public string UserFriendlyAge
47 {
48 get
49 {
50 if (Age.TotalDays / 365.24 > 5)
51 return Math.Floor((Age.TotalDays / 365.24)).ToString() + " years";
52 else
53 return Math.Floor((Age.TotalDays / 365.24)).ToString() + " years & "
54 + Math.Floor(Age.TotalDays % 365.24 / 30).ToString() + " months";
55 }
56 }
57 }
58}
Note: See TracBrowser for help on using the repository browser.