diff --git a/Docs/Locations.puml b/Docs/Locations.puml new file mode 100644 index 00000000000..83e68746a03 --- /dev/null +++ b/Docs/Locations.puml @@ -0,0 +1,66 @@ +@startuml + +title Location Service Module Architecture (Detailed) + +' 1. Interface Service (Berdasarkan kode yang Anda kirim) +interface LocationService { + ' Core Location methods + + saveLocation(Location) : Location + + getLocation(Integer) : Location + + getLocationByUuid(String) : Location + + getAllLocations(boolean) : List + + retireLocation(Location, String) : Location + + purgeLocation(Location) : void + + ' Location Tag methods (Ditemukan di source code) + + saveLocationTag(LocationTag) : LocationTag + + getAllLocationTags() : List + + getLocationsByTag(LocationTag) : List + + ' Attribute methods (Ditemukan di source code) + + saveLocationAttributeType(LocationAttributeType) : LocationAttributeType +} + +' 2. Class Implementasi +class LocationServiceImpl { + - dao : LocationDAO + + saveLocation(Location) : Location + + getLocation(Integer) : Location + + saveLocationTag(LocationTag) : LocationTag +} + +' 3. Interface DAO +interface LocationDAO { + + saveLocation(Location) : Location + + getLocation(Integer) : Location + + getAllLocations(boolean) : List + + saveLocationTag(LocationTag) : LocationTag +} + +' 4. ENTITIES (Data Objects) +class Location { + - locationId : Integer + - name : String + - parentLocation : Location + - tags : Set +} + +class LocationTag { + - locationTagId : Integer + - name : String +} + +' 5. HUBUNGAN (RELATIONSHIPS) + +' Realization +LocationService <|.. LocationServiceImpl : implements + +' Dependency Injection +LocationServiceImpl --> LocationDAO : uses + +' Entity Relationships +LocationService ..> Location : manages +LocationService ..> LocationTag : manages +Location "1" *-- "0..*" LocationTag : has + +@enduml diff --git a/Docs/Screenshot 2025-12-06 093138.png b/Docs/Screenshot 2025-12-06 093138.png new file mode 100644 index 00000000000..0514cfec439 Binary files /dev/null and b/Docs/Screenshot 2025-12-06 093138.png differ diff --git a/Docs/Week 12/Analisis.md b/Docs/Week 12/Analisis.md new file mode 100644 index 00000000000..5b2099dbb70 --- /dev/null +++ b/Docs/Week 12/Analisis.md @@ -0,0 +1,39 @@ +# Domain Encounter — Analisis + +## 1. Apakah sebuah encounter merupakan bagian dari sebuah visit, atau sebuah visit merupakan bagian dari sebuah encounter? + +**Jawaban:** +**Encounter adalah bagian dari visit.** + +**Alasan:** +Dalam skema database OpenMRS, foreign key berada pada tabel **`encounter`**, yaitu: + + +Ini berarti: + +- Satu **visit** dapat berisi **banyak encounter**. +- Karena itu, encounter termasuk di dalam visit, bukan sebaliknya. + +Sehingga interpretasi yang benar adalah: + +**Encounter ⟶ bagian dari Visit** +(Visit adalah entitas induk, encounter adalah entitas anak di dalam visit) + +--- + +## 2. Bagaimana provider terhubung dengan person? + +**Jawaban:** +Provider terhubung dengan person melalui kolom `person_id` pada tabel **`provider`**. + + +**Penjelasan:** +- Setiap provider di OpenMRS sebenarnya adalah seorang **person** yang memiliki peran klinis. +- Informasi demografis (nama, jenis kelamin, tanggal lahir, dll.) disimpan di tabel **person**. +- Tabel provider menambahkan informasi khusus provider, seperti identifier, role, dan metadata. + +Dengan demikian: + +**Provider** adalah **person** yang diberi atribut tambahan sebagai penyedia layanan, +dihubungkan melalui **`provider.person_id` → `person.person_id`**. + diff --git a/Docs/Week 12/Encounter_domain_erd.puml b/Docs/Week 12/Encounter_domain_erd.puml new file mode 100644 index 00000000000..0f72dd35e4b --- /dev/null +++ b/Docs/Week 12/Encounter_domain_erd.puml @@ -0,0 +1,91 @@ +@startuml + +hide circle +skinparam linetype ortho + +title Encounter Domain ER Diagram (Week 12) + +' 1. TABLE: ENCOUNTER (Center) +entity "encounter" as e { + *encounter_id : int <> + -- + *encounter_datetime : datetime + *patient_id : int <> + *location_id : int <> + *encounter_type_id : int <> + *visit_id : int <> + form_id : int +} + +' 2. TABLE: ENCOUNTER TYPE +entity "encounter_type" as et { + *encounter_type_id : int <> + -- + *name : varchar + description : text +} + +' 3. TABLE: VISIT +entity "visit" as v { + *visit_id : int <> + -- + *patient_id : int <> + start_datetime : datetime + end_datetime : datetime + visit_type_id : int +} + +' 4. TABLE: PATIENT +entity "patient" as p { + *patient_id : int <> + -- + gender : varchar + birthdate : date +} + +' 5. TABLE: LOCATION +entity "location" as l { + *location_id : int <> + -- + *name : varchar + address1 : varchar +} + +' 6. TABLE: PROVIDER (Who did it?) +entity "provider" as prov { + *provider_id : int <> + -- + *person_id : int <> + identifier : varchar + name : varchar +} + +' Junction Table (Penghubung Encounter & Provider) +entity "encounter_provider" as ep { + *encounter_provider_id : int <> + -- + *encounter_id : int <> + *provider_id : int <> + *encounter_role_id : int <> +} + +' --- RELATIONSHIPS --- + +' Encounter is part of Visit +v ||..o{ e : "contains" + +' Patient Relations +p ||..o{ v : "has visits" +p ||..o{ e : "has encounters" + +' Location Relations +l ||..o{ e : "happens at" + +' Type Relations +et ||..o{ e : "defines type of" + +' Provider Relations +e ||..|{ ep : "has" +ep }|..|| prov : "performed by" + +@enduml diff --git a/Docs/Week 12/Screenshot 2025-12-06 093138.png b/Docs/Week 12/Screenshot 2025-12-06 093138.png new file mode 100644 index 00000000000..0514cfec439 Binary files /dev/null and b/Docs/Week 12/Screenshot 2025-12-06 093138.png differ