-
Notifications
You must be signed in to change notification settings - Fork 2
/
appointment.h
42 lines (36 loc) · 1.25 KB
/
appointment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#ifndef APPOINTMENT_H
#define APPOINTMENT_H
#include <string>
#include <chrono>
#include <boost/date_time/posix_time/posix_time.hpp>
enum AppointmentTypes {
General,
Flu,
Bloodwork
};
const std::string AppointmentTypesString[] = {
"General Appointment",
"Flu Shot",
"Blood Work"
};
AppointmentTypes stringToType(std::string str);
class Appointment {
private:
AppointmentTypes type;
boost::posix_time::time_period period = boost::posix_time::time_period(boost::posix_time::ptime(), boost::posix_time::ptime());
std::string patientName;
public:
Appointment(AppointmentTypes type, std::string time, std::string name);
AppointmentTypes getType() const;
std::string getTypeString() const;
boost::posix_time::ptime getTimeStart() const;
boost::posix_time::ptime getTimeEnd() const;
boost::gregorian::date getDateBegin() const;
boost::gregorian::date getDateEnd() const;
boost::posix_time::time_duration getTimeOfDayStart() const;
boost::posix_time::time_duration getTimeOfDayEnd() const;
boost::posix_time::time_duration getLength() const;
std::string getPatientName() const;
friend std::ostream& operator<<(std::ostream& os, const Appointment& appointment);
};
#endif //APPOINTMENT_H