-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPatientDBAdapter.hpp
42 lines (34 loc) · 1.07 KB
/
PatientDBAdapter.hpp
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
// PatientDBAdapter.hpp
// AmiKo-wx
//
// Created by Alex Bettarini on 21 Jul 2020
// Copyright © 2020 Ywesee GmbH. All rights reserved.
#pragma once
#include "SQLiteDatabase.hpp"
#include <map>
#include <set>
class SQLiteDatabase;
class Patient;
class PatientDBAdapter
{
public:
static PatientDBAdapter * sharedInstance();
virtual ~PatientDBAdapter() {}
long getLargestRowId();
bool openDatabase(wxString dbName);
Patient * getPatientWithUniqueID(wxString uniqueID);
wxString addEntry(Patient *patient);
wxString insertEntry(Patient *patient);
bool deleteEntry(Patient *patient);
Patient * cursorToPatient(ONE_SQL_RESULT &cursor);
std::vector<Patient *> getAllPatients();
std::map<std::string, std::string> getAllTimestamps();
std::vector<Patient*> getPatientsWithUniqueIDs(std::set<std::string> uniqueIDs);
void upsertEntry(Patient *patient);
private:
// private constructor so that it can not be called
PatientDBAdapter();
static PatientDBAdapter* sharedObject;
// .m 55
SQLiteDatabase *myPatientDb;
};