{"id":19004325,"url":"https://github.com/ssanthosh010303/d7c1","last_synced_at":"2026-05-20T14:05:08.691Z","repository":{"id":233870609,"uuid":"787949847","full_name":"ssanthosh010303/d7c1","owner":"ssanthosh010303","description":"Day-7 Challenge-1: Data Abstraction Layer Implementation for a 3-tier Doctor Appointment System","archived":false,"fork":false,"pushed_at":"2024-04-18T02:31:21.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T14:14:52.428Z","etag":null,"topics":["classlibrary","csharp","dotnet"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssanthosh010303.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-17T13:45:49.000Z","updated_at":"2024-04-17T13:47:21.000Z","dependencies_parsed_at":"2024-04-17T14:57:50.261Z","dependency_job_id":"235ac686-20c5-418d-9945-cfab24f5e7fe","html_url":"https://github.com/ssanthosh010303/d7c1","commit_stats":null,"previous_names":["ssanthosh010303/d7c1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssanthosh010303/d7c1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssanthosh010303%2Fd7c1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssanthosh010303%2Fd7c1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssanthosh010303%2Fd7c1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssanthosh010303%2Fd7c1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssanthosh010303","download_url":"https://codeload.github.com/ssanthosh010303/d7c1/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssanthosh010303%2Fd7c1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269683223,"owners_count":24458636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classlibrary","csharp","dotnet"],"created_at":"2024-11-08T18:22:47.053Z","updated_at":"2026-05-20T14:05:03.667Z","avatar_url":"https://github.com/ssanthosh010303.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Day-7 Challenge-1: Data Abstraction Layer Implementation for a 3-tier Doctor Appointment System\n\n- **Author:** Sakthi (Sandy) Santhosh\n- **Created on:** 17/04/2024\n\n## Description\n\nThis .NET solution is a part of 3-tier architecture-based application. The goal of the application is to manage doctors and patients with appointments. This .NET solution implements the 3rd layer of the architecture, that is the data abstraction layer. It provides an interface to the second layer (business logic layer) that the layer can use. This decouples low-level code from high-level code, adhering to dependency inversion, which is one of the principles in the SOLID principles.\n\n## Build\n\nOpen a shell instance on your machine, navigate to the project folder and run the following command:\n\n```bash\ndotnet build --project ./DataLinkLibrary/DataLinkLibrary.csproj\n```\n\nThis will output the assembly as DLL to `/DataLinkLibrary/bin/` folder.\n\n## Logic\n\n### Interface: `IAppointmentRepository` (implemented by `AppointmentRepository`)\n\n1. **`GetById(int id)`:** This method retrieves an appointment by its unique identifier. It searches through the list of appointments and returns the one with the matching ID, if found.\n2. **`GetAll()`**: This method returns all appointments available in the repository. It provides a complete list of appointments without any filtering.\n3. **`Schedule(int id, Doctor doctor, Patient patient, DateTime appointmentDateTime)`:** This method is used to schedule a new appointment. It takes parameters like the appointment ID, doctor, patient, and the date and time of the appointment. It creates a new appointment object and adds it to the list of appointments.\n4. **`UpdateSchedule(int id, DateTime appointmentDateTime)`:** This method updates the schedule of an existing appointment identified by its ID. It changes the date and time of the appointment to the provided value.\n5. **`Unschedule(int id)`:** This method removes a scheduled appointment from the repository. It first retrieves the appointment by its ID, then removes it from both the main list of appointments and the list of appointments associated with the doctor.\n\n### Interface: `IDoctorRepository` (implemented by `DoctorRepository`)\n\n1. **`GetById(int id)`:** This method retrieves a doctor by their unique identifier. It searches through the list of doctors and returns the one with the matching ID, if found.\n2. **`GetAll()`:** This method returns all doctors available in the repository. It provides a complete list of doctors without any filtering.\n3. **`Add(int id, string name, string specialization)`:** This method adds a new doctor to the repository. It creates a new doctor object with the provided ID, name, and specialization, then adds it to the list of doctors if it doesn't already exist.\n4. **`Update(int id, string name, string specialization)`:** This method updates the details of an existing doctor. It modifies the name and specialization of the doctor identified by the provided ID.\n5. **`Delete(int id)`:** This method deletes a doctor from the repository based on their ID. It removes the doctor from the list of doctors.\n6. **`IsAvailable(int doctorId, DateTime appointmentDateTime)`:** This method checks if a doctor is available at a specified date and time. It verifies whether the doctor has any appointments scheduled at the given time.\n7. **`GetPatientDetailsAtScheduledTime(int doctorId, DateTime appointmentDateTime)`:** This method retrieves the details of the patient scheduled for an appointment with the specified doctor at the given date and time. It returns the patient associated with the appointment if there is one, otherwise, it returns null.\n\n### Interface `IPatientRepository` (implemented by `PatientRepository`)\n\n1. **`GetById(int id)`:** This method retrieves a patient by their unique identifier. It searches through the list of patients and returns the one with the matching ID, if found.\n2. **`GetAll()`:** This method returns all patients available in the repository. It provides a complete list of patients without any filtering.\n3. **`Add(int id, string name, string contactNumber)`:** This method adds a new patient to the repository. It creates a new patient object with the provided ID, name, and contact number, then adds it to the list of patients if it doesn't already exist.\n4. **`Update(int id, string name, string contactNumber)`:** This method updates the details of an existing patient. It modifies the name and contact number of the patient identified by the provided ID.\n5. **`Delete(int id)`:** This method deletes a patient from the repository based on their ID. It removes the patient from the list of patients.\n\n## Information\n\n### System\n\n- **Operating System:** Debian Headless 12.0\n- **Kernel:** `6.1.0-rpi4-rpi-v8`\n- **Architecture:** `aarch64` (`arm64`)\n\n### .NET Framework\n\n- **SDK:** 8.0.204\n- **Runtimes Installed:**\n    - **ASP.NET:** 8.0.4\n    - **.NET Core:** 8.0.4\n\n## Contribution\n\nThis project was created for learning and development purposes only. Any contributions to the repository is discouraged.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssanthosh010303%2Fd7c1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssanthosh010303%2Fd7c1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssanthosh010303%2Fd7c1/lists"}