appointmentlib-gopi 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: appointmentlib-gopi
3
+ Version: 1.0.0
4
+ Summary: Patient Appointment Scheduler Library - NCI MSc Cloud Computing
5
+ Author: Gopi
6
+ Author-email: gopi619999@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: requires-python
18
+ Dynamic: summary
19
+
20
+ # AppointmentLib
21
+
22
+ A Python library for managing patient appointments in a healthcare scheduling system.
23
+ Built as part of NCI MSc Cloud Computing - Cloud Platform Programming project.
24
+
25
+ ## Installation
26
+ pip install appointmentlib-gopi
27
+
28
+ ## Usage
29
+ from appointmentlib import Appointment, AppointmentScheduler
30
+
31
+ appt = Appointment("PAT001", "DOC001", "2026-04-20T10:00", "Annual checkup")
32
+ print(appt.get_status()) # scheduled
33
+ appt.cancel()
34
+ print(appt.get_status()) # cancelled
35
+
36
+ scheduler = AppointmentScheduler()
37
+ scheduler.add_appointment(appt)
38
+ print(scheduler.summarize()) # Total appointments: 1
@@ -0,0 +1,19 @@
1
+ # AppointmentLib
2
+
3
+ A Python library for managing patient appointments in a healthcare scheduling system.
4
+ Built as part of NCI MSc Cloud Computing - Cloud Platform Programming project.
5
+
6
+ ## Installation
7
+ pip install appointmentlib-gopi
8
+
9
+ ## Usage
10
+ from appointmentlib import Appointment, AppointmentScheduler
11
+
12
+ appt = Appointment("PAT001", "DOC001", "2026-04-20T10:00", "Annual checkup")
13
+ print(appt.get_status()) # scheduled
14
+ appt.cancel()
15
+ print(appt.get_status()) # cancelled
16
+
17
+ scheduler = AppointmentScheduler()
18
+ scheduler.add_appointment(appt)
19
+ print(scheduler.summarize()) # Total appointments: 1
@@ -0,0 +1,94 @@
1
+ """
2
+ AppointmentLib - Patient Appointment Scheduler Library
3
+ A Python wrapper for the AppointmentLib C++ OOP library.
4
+ Provides appointment validation, status management, and scheduling.
5
+ """
6
+
7
+ class Appointment:
8
+ """Represents a patient appointment with validation and status management."""
9
+
10
+ def __init__(self, patient_id, doctor_id, date_time, notes=""):
11
+ self.patient_id = patient_id
12
+ self.doctor_id = doctor_id
13
+ self.date_time = date_time
14
+ self.notes = notes
15
+ self.status = "scheduled"
16
+ if not self.validate():
17
+ raise ValueError("Invalid appointment data")
18
+
19
+ def validate(self):
20
+ """Validate appointment data."""
21
+ if not self.patient_id or not self.doctor_id:
22
+ return False
23
+ if not self._is_valid_date(self.date_time):
24
+ return False
25
+ return True
26
+
27
+ def _is_valid_date(self, dt):
28
+ """Check date format YYYY-MM-DDTHH:MM"""
29
+ if len(dt) != 16:
30
+ return False
31
+ if dt[4] != '-' or dt[7] != '-' or dt[10] != 'T' or dt[13] != ':':
32
+ return False
33
+ return True
34
+
35
+ def to_json(self):
36
+ """Serialize appointment to JSON string."""
37
+ import json
38
+ return json.dumps({
39
+ "patientId": self.patient_id,
40
+ "doctorId": self.doctor_id,
41
+ "dateTime": self.date_time,
42
+ "status": self.status,
43
+ "notes": self.notes
44
+ })
45
+
46
+ def cancel(self):
47
+ """Cancel the appointment."""
48
+ self.status = "cancelled"
49
+
50
+ def complete(self):
51
+ """Mark appointment as completed."""
52
+ self.status = "completed"
53
+
54
+ def get_status(self):
55
+ return self.status
56
+
57
+ def __repr__(self):
58
+ return f"Appointment({self.patient_id}, {self.doctor_id}, {self.date_time}, {self.status})"
59
+
60
+
61
+ class AppointmentScheduler:
62
+ """Manages a collection of appointments."""
63
+
64
+ def __init__(self):
65
+ self.appointments = []
66
+
67
+ def add_appointment(self, appointment):
68
+ """Add an appointment to the scheduler."""
69
+ self.appointments.append(appointment)
70
+
71
+ def get_by_patient(self, patient_id):
72
+ """Get all appointments for a patient."""
73
+ return [a for a in self.appointments if a.patient_id == patient_id]
74
+
75
+ def get_by_doctor(self, doctor_id):
76
+ """Get all appointments for a doctor."""
77
+ return [a for a in self.appointments if a.doctor_id == doctor_id]
78
+
79
+ def has_conflict(self, doctor_id, date_time):
80
+ """Check if doctor has a conflicting appointment."""
81
+ return any(
82
+ a.doctor_id == doctor_id and
83
+ a.date_time == date_time and
84
+ a.status == "scheduled"
85
+ for a in self.appointments
86
+ )
87
+
88
+ def get_total_count(self):
89
+ """Get total number of appointments."""
90
+ return len(self.appointments)
91
+
92
+ def summarize(self):
93
+ """Get summary of all appointments."""
94
+ return f"Total appointments: {len(self.appointments)}"
@@ -0,0 +1,38 @@
1
+ Metadata-Version: 2.4
2
+ Name: appointmentlib-gopi
3
+ Version: 1.0.0
4
+ Summary: Patient Appointment Scheduler Library - NCI MSc Cloud Computing
5
+ Author: Gopi
6
+ Author-email: gopi619999@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.8
11
+ Description-Content-Type: text/markdown
12
+ Dynamic: author
13
+ Dynamic: author-email
14
+ Dynamic: classifier
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: requires-python
18
+ Dynamic: summary
19
+
20
+ # AppointmentLib
21
+
22
+ A Python library for managing patient appointments in a healthcare scheduling system.
23
+ Built as part of NCI MSc Cloud Computing - Cloud Platform Programming project.
24
+
25
+ ## Installation
26
+ pip install appointmentlib-gopi
27
+
28
+ ## Usage
29
+ from appointmentlib import Appointment, AppointmentScheduler
30
+
31
+ appt = Appointment("PAT001", "DOC001", "2026-04-20T10:00", "Annual checkup")
32
+ print(appt.get_status()) # scheduled
33
+ appt.cancel()
34
+ print(appt.get_status()) # cancelled
35
+
36
+ scheduler = AppointmentScheduler()
37
+ scheduler.add_appointment(appt)
38
+ print(scheduler.summarize()) # Total appointments: 1
@@ -0,0 +1,7 @@
1
+ README.md
2
+ setup.py
3
+ appointmentlib/__init__.py
4
+ appointmentlib_gopi.egg-info/PKG-INFO
5
+ appointmentlib_gopi.egg-info/SOURCES.txt
6
+ appointmentlib_gopi.egg-info/dependency_links.txt
7
+ appointmentlib_gopi.egg-info/top_level.txt
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,18 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="appointmentlib-gopi",
5
+ version="1.0.0",
6
+ author="Gopi",
7
+ author_email="gopi619999@gmail.com",
8
+ description="Patient Appointment Scheduler Library - NCI MSc Cloud Computing",
9
+ long_description=open("README.md").read(),
10
+ long_description_content_type="text/markdown",
11
+ packages=find_packages(),
12
+ python_requires=">=3.8",
13
+ classifiers=[
14
+ "Programming Language :: Python :: 3",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ ],
18
+ )