├── public ├── favicon.ico ├── robots.txt ├── storage │ └── images │ │ ├── 88.png │ │ ├── 124.png │ │ ├── 168.png │ │ ├── 177.png │ │ ├── 186.png │ │ ├── 218.png │ │ ├── 221.png │ │ ├── 286.png │ │ ├── 557.png │ │ ├── emer.png │ │ ├── r124.png │ │ ├── r189.png │ │ ├── r221.png │ │ ├── r263.png │ │ ├── r286.png │ │ ├── logo-rsum.png │ │ ├── welcome-doctor.png │ │ └── welcome-onboard.png ├── build │ └── assets │ │ ├── _plugin-vue_export-helper-c27b6911.js │ │ └── RiwayatPengobatanStatement-035f7a56.css └── .htaccess ├── database ├── .gitignore ├── factories │ ├── fhir │ │ ├── datatypes │ │ │ ├── RatioFactory.php │ │ │ ├── DoseAndRateFactory.php │ │ │ ├── TimingFactory.php │ │ │ ├── ReferenceFactory.php │ │ │ ├── CodeableConceptFactory.php │ │ │ ├── AnnotationFactory.php │ │ │ ├── PeriodFactory.php │ │ │ ├── NarrativeFactory.php │ │ │ ├── DosageFactory.php │ │ │ ├── SimpleQuantityFactory.php │ │ │ ├── AddressFactory.php │ │ │ ├── DurationFactory.php │ │ │ ├── QuantityFactory.php │ │ │ └── HumanNameFactory.php │ │ ├── backboneelements │ │ │ ├── ConditionStageFactory.php │ │ │ ├── EncounterDiagnosisFactory.php │ │ │ ├── ProcedurePerformerFactory.php │ │ │ ├── EncounterParticipantFactory.php │ │ │ ├── ProcedureFocalDeviceFactory.php │ │ │ ├── EncounterClassHistoryFactory.php │ │ │ ├── EncounterHospitalizationFactory.php │ │ │ ├── ClinicalImpressionInvestigationFactory.php │ │ │ ├── PatientCommunicationFactory.php │ │ │ ├── ClinicalImpressionFindingFactory.php │ │ │ ├── MedicationRequestDispenseRequestInitialFillFactory.php │ │ │ ├── MedicationRequestSubstitutionFactory.php │ │ │ ├── QuestionnaireResponseItemAnswerFactory.php │ │ │ ├── MedicationRequestDispenseRequestFactory.php │ │ │ ├── QuestionnaireResponseItemFactory.php │ │ │ ├── PatientContactFactory.php │ │ │ ├── EncounterLocationFactory.php │ │ │ ├── EncounterStatusHistoryFactory.php │ │ │ ├── LocationPositionFactory.php │ │ │ ├── CompositionAttesterFactory.php │ │ │ ├── CompositionSectionFactory.php │ │ │ ├── AllergyIntoleranceReactionFactory.php │ │ │ └── LocationHoursOfOperationFactory.php │ │ ├── resources │ │ │ ├── EncounterFactory.php │ │ │ ├── PractitionerFactory.php │ │ │ ├── ConditionFactory.php │ │ │ ├── QuestionnaireResponseFactory.php │ │ │ ├── ProcedureFactory.php │ │ │ ├── MedicationStatementFactory.php │ │ │ ├── CompositionFactory.php │ │ │ ├── PatientFactory.php │ │ │ ├── ClinicalImpressionFactory.php │ │ │ └── ObservationFactory.php │ │ └── ResourceFactory.php │ ├── PractitionerUserFactory.php │ └── UserFactory.php ├── seeders │ ├── codesystems │ │ ├── UCUMSeeder.php │ │ ├── BCP13Seeder.php │ │ ├── BCP47Seeder.php │ │ ├── ICD10Seeder.php │ │ ├── LoincSeeder.php │ │ ├── ISO3166Seeder.php │ │ ├── V3ActCodeSeeder.php │ │ ├── ServiceTypeSeeder.php │ │ ├── ICD9CMProcedureSeeder.php │ │ ├── ClinicalSpecialtySeeder.php │ │ └── AdministrativeAreaSeeder.php │ ├── valuesets │ │ ├── ParticipantRolesSeeder.php │ │ ├── SNOMEDCTBodySiteSeeder.php │ │ ├── ConditionStageTypeSeeder.php │ │ ├── EncounterReasonCodeSeeder.php │ │ ├── RiwayatPenyakitKeluargaSeeder.php │ │ ├── RiwayatPenyakitPribadiSeeder.php │ │ ├── AllergyReactionSubstanceSeeder.php │ │ ├── ProcedureDeviceActionCodesSeeder.php │ │ ├── ProcedureNotPerformedReasonSeeder.php │ │ ├── ProcedurePerformerRoleCodesSeeder.php │ │ ├── ObservationRefRangeAppliesToSeeder.php │ │ └── MedicationIngredientStrengthDenominatorSeeder.php │ └── UserSeeder.php └── migrations │ ├── 2023_11_25_203246_create_codesystem_iso3166_table.php │ ├── 2023_11_30_204916_create_valueset_dosage_site_table.php │ ├── 2023_12_08_135905_create_valueset_participantroles_table.php │ ├── 2023_10_31_072450_create_codesystem_servicetype_table.php │ ├── 2023_12_04_135224_create_codesystem_ucum_table.php │ ├── 2023_12_04_014053_create_valueset_snomedctbodysite_table.php │ ├── 2023_12_01_230719_create_codesystem_clinicalspecialty_table.php │ ├── 2023_10_31_084614_create_valueset_encounterreasoncode_table.php │ ├── 2023_11_22_155358_create_valueset_conditionstagetype_table.php │ ├── 2023_10_31_163004_create_codesystem_icd10_table.php │ ├── 2023_11_04_205903_create_valueset_procedure_reasoncode_table.php │ ├── 2023_12_22_023235_create_codesystem_bcp13_table.php │ ├── 2023_12_04_013215_create_valueset_riwayatpenyakitpribadi_table.php │ ├── 2023_11_04_013121_create_codesystem_loinc_table.php │ ├── 2023_11_06_200803_create_valueset_proceduredeviceactioncodes.php │ ├── 2023_11_29_215105_create_codesystem_bcp47_table.php │ ├── 2023_12_04_013222_create_valueset_riwayatpenyakitkeluarga_table.php │ ├── 2023_11_06_205144_create_valueset_procedurenotperformedreason_table.php │ ├── 2014_10_12_100000_create_password_reset_tokens_table.php │ ├── 2023_11_04_214525_create_codesystem_icd9cm_procedure_table.php │ ├── 2023_12_05_003547_create_codesystem_icd9cmprocedure_table.php │ ├── 2023_12_06_122652_create_codesystem_v3actcode_table.php │ ├── 2023_11_06_170956_create_valueset_procedureperformerrolecodes_table.php │ ├── 2023_12_31_211125_create_valueset_allergy_reactionsubstance_table.php │ ├── 2023_12_23_123347_create_ranges_table.php │ ├── 2023_12_23_201514_create_ratios_table.php │ ├── 2023_10_16_083704_create_condition_stage_table.php │ ├── 2023_12_23_235016_create_dose_and_rates_table.php │ ├── 2023_10_16_083859_create_condition_evidence_table.php │ ├── 2023_10_20_114827_create_procedure_performer_table.php │ ├── 2023_10_22_151152_create_composition_event_table.php │ ├── 2023_10_15_090754_create_encounter_participants_table.php │ ├── 2023_10_06_140238_create_patient_link_table.php │ ├── 2023_10_15_085627_create_encounter_table.php │ ├── 2023_10_15_090652_create_encounter_class_history_table.php │ ├── 2023_10_20_115728_create_procedure_focal_device_table.php │ ├── 2023_12_23_201457_create_timings_table.php │ ├── 2024_01_03_204112_create_failed_api_requests_table.php │ ├── 2023_10_09_121639_create_organization_contact_table.php │ ├── 2023_12_21_232752_create_codesystem_resourcetype_table.php │ ├── 2023_10_20_153348_create_medication_table.php │ ├── 2023_11_22_155756_create_valueset_observation_refrangeappliesto_table.php │ ├── 2023_09_21_163331_create_practitioner_qualification_table.php │ ├── 2023_12_21_230834_create_codeable_concepts_table.php │ ├── 2023_12_22_233221_create_encounter_hospitalizations_table.php │ ├── 2023_10_15_091033_create_encounter_location_table.php │ ├── 2023_12_24_112959_create_narratives_table.php │ ├── 2019_08_19_000000_create_failed_jobs_table.php │ ├── 2023_10_06_140237_create_patient_communication_table.php │ ├── 2023_10_17_062904_create_obs_comp_ref_range_table.php │ ├── 2023_10_25_050124_create_clinical_impression_investigation_table.php │ ├── 2023_11_07_144856_create_valueset_medication_ingredientstrengthdenominator_table.php │ ├── 2023_10_15_090130_create_encounter_status_history_table.php │ ├── 2023_10_15_090920_create_encounter_diagnosis_table.php │ ├── 2023_10_17_062216_create_observation_ref_range_table.php │ ├── 2023_10_21_041531_create_med_req_disp_req_initial_fill_table.php │ ├── 2023_10_20_154243_create_medication_ingredient_table.php │ ├── 2023_10_21_041531_create_med_req_substitution_table.php │ ├── 2023_12_21_231419_create_periods_table.php │ ├── 2023_10_06_140236_create_patient_contact_table.php │ ├── 2023_10_25_050537_create_clinical_impression_finding_table.php │ ├── 2023_12_21_235723_create_complex_extensions_table.php │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2023_10_21_041530_create_med_req_dispense_request_table.php │ ├── 2023_10_22_150622_create_composition_relates_to_table.php │ ├── 2023_09_10_161041_create_resource_table.php │ ├── 2023_10_20_154244_create_medication_batch_table.php │ ├── 2023_09_10_161942_create_resource_content_table.php │ ├── 2023_10_09_121210_create_organization_table.php │ ├── 2023_12_21_214539_create_identifiers_table.php │ ├── 2023_10_11_163117_create_location_position_table.php │ ├── 2023_12_21_231721_create_references_table.php │ ├── 2023_12_23_121519_create_annotations_table.php │ ├── 2023_10_09_120151_create_practitioner_user_table.php │ └── 2023_10_22_150348_create_composition_attester_table.php ├── bootstrap └── cache │ └── .gitignore ├── storage ├── logs │ └── .gitignore ├── framework │ ├── testing │ │ └── .gitignore │ ├── views │ │ └── .gitignore │ ├── cache │ │ ├── data │ │ │ └── .gitignore │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── .gitignore ├── app │ └── public │ │ └── images │ │ ├── 124.png │ │ ├── 168.png │ │ ├── 177.png │ │ ├── 186.png │ │ ├── 218.png │ │ ├── 221.png │ │ ├── 286.png │ │ ├── 557.png │ │ ├── 88.png │ │ ├── emer.png │ │ ├── r124.png │ │ ├── r189.png │ │ ├── r221.png │ │ ├── r263.png │ │ ├── r286.png │ │ ├── logo-rsum.png │ │ ├── welcome-doctor.png │ │ └── welcome-onboard.png └── example-id-fhir │ ├── MedicationStatement-031c8acb-192e-49ff-801c-6dbb9c966efc.json │ ├── Patient-P02029102723.json │ ├── Patient-P02029102734.json │ ├── Patient-P02029102745.json │ ├── Patient-P02029102756.json │ ├── Patient-P02029102767.json │ ├── Patient-P02029102778.json │ ├── Patient-P02029102803.json │ ├── Patient-P02029102814.json │ └── Patient-P02029102825.json ├── resources ├── js │ ├── Components │ │ ├── ApplicationLogo.vue │ │ ├── AppHead.vue │ │ ├── InputError.vue │ │ ├── InputLabel.vue │ │ ├── DropdownLink.vue │ │ ├── SecondaryButton.vue │ │ ├── BackButton.vue │ │ ├── Checkbox.vue │ │ ├── TextInput.vue │ │ ├── TextArea.vue │ │ └── DeleteButton.vue │ ├── Layouts │ │ ├── GuestLayout.vue │ │ └── AuthenticatedLayoutBack.vue │ └── app.js └── views │ └── app.blade.php ├── postcss.config.js ├── app ├── Models │ ├── FhirModel.php │ ├── FailedApiRequest.php │ └── Fhir │ │ ├── ResourceContent.php │ │ ├── Datatypes │ │ ├── Coding.php │ │ ├── SimpleQuantity.php │ │ ├── Period.php │ │ ├── Narrative.php │ │ ├── Duration.php │ │ ├── CodeableConcept.php │ │ ├── Age.php │ │ ├── Quantity.php │ │ ├── Annotation.php │ │ ├── Ratio.php │ │ ├── ComplexExtension.php │ │ ├── Reference.php │ │ ├── Range.php │ │ ├── SampledData.php │ │ ├── ContactPoint.php │ │ └── HumanName.php │ │ └── BackboneElements │ │ ├── MedicationBatch.php │ │ ├── LocationPosition.php │ │ ├── PatientLink.php │ │ ├── LocationHoursOfOperation.php │ │ └── EncounterStatusHistory.php ├── Http │ ├── Controllers │ │ ├── Controller.php │ │ ├── Fhir │ │ │ └── ResourceController.php │ │ └── Auth │ │ │ ├── EmailVerificationPromptController.php │ │ │ ├── EmailVerificationNotificationController.php │ │ │ ├── PasswordController.php │ │ │ └── VerifyEmailController.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── PreventRequestsDuringMaintenance.php │ │ ├── TrimStrings.php │ │ ├── TrustHosts.php │ │ ├── Authenticate.php │ │ ├── ValidateSignature.php │ │ ├── TrustProxies.php │ │ └── RedirectIfAuthenticated.php │ └── Requests │ │ ├── Fhir │ │ ├── Search │ │ │ ├── OrganizationSearchRequest.php │ │ │ ├── LocationSearchRequest.php │ │ │ ├── ObservationSearchRequest.php │ │ │ ├── PatientSearchRequest.php │ │ │ ├── PractitionerSearchRequest.php │ │ │ └── KfaRequest.php │ │ └── ConsentRequest.php │ │ └── ProfileUpdateRequest.php ├── Providers │ ├── BroadcastServiceProvider.php │ └── AuthServiceProvider.php ├── Exceptions │ └── Handler.php └── Console │ └── Kernel.php ├── jsconfig.json ├── .gitattributes ├── tests ├── TestCase.php ├── CreatesApplication.php └── Unit │ ├── RouteTest.php │ ├── SeederTest.php │ └── ResourceTest.php ├── .gitignore ├── .editorconfig ├── vite.config.js ├── routes ├── channels.php ├── api.php └── console.php ├── package.json └── config └── cors.php /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite* 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/framework/testing/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/data/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !data/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /public/storage/images/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/88.png -------------------------------------------------------------------------------- /public/storage/images/124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/124.png -------------------------------------------------------------------------------- /public/storage/images/168.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/168.png -------------------------------------------------------------------------------- /public/storage/images/177.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/177.png -------------------------------------------------------------------------------- /public/storage/images/186.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/186.png -------------------------------------------------------------------------------- /public/storage/images/218.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/218.png -------------------------------------------------------------------------------- /public/storage/images/221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/221.png -------------------------------------------------------------------------------- /public/storage/images/286.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/286.png -------------------------------------------------------------------------------- /public/storage/images/557.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/557.png -------------------------------------------------------------------------------- /public/storage/images/emer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/emer.png -------------------------------------------------------------------------------- /public/storage/images/r124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/r124.png -------------------------------------------------------------------------------- /public/storage/images/r189.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/r189.png -------------------------------------------------------------------------------- /public/storage/images/r221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/r221.png -------------------------------------------------------------------------------- /public/storage/images/r263.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/r263.png -------------------------------------------------------------------------------- /public/storage/images/r286.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/r286.png -------------------------------------------------------------------------------- /resources/js/Components/ApplicationLogo.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /storage/app/public/images/124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/124.png -------------------------------------------------------------------------------- /storage/app/public/images/168.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/168.png -------------------------------------------------------------------------------- /storage/app/public/images/177.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/177.png -------------------------------------------------------------------------------- /storage/app/public/images/186.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/186.png -------------------------------------------------------------------------------- /storage/app/public/images/218.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/218.png -------------------------------------------------------------------------------- /storage/app/public/images/221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/221.png -------------------------------------------------------------------------------- /storage/app/public/images/286.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/286.png -------------------------------------------------------------------------------- /storage/app/public/images/557.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/557.png -------------------------------------------------------------------------------- /storage/app/public/images/88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/88.png -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /public/storage/images/logo-rsum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/logo-rsum.png -------------------------------------------------------------------------------- /storage/app/public/images/emer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/emer.png -------------------------------------------------------------------------------- /storage/app/public/images/r124.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/r124.png -------------------------------------------------------------------------------- /storage/app/public/images/r189.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/r189.png -------------------------------------------------------------------------------- /storage/app/public/images/r221.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/r221.png -------------------------------------------------------------------------------- /storage/app/public/images/r263.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/r263.png -------------------------------------------------------------------------------- /storage/app/public/images/r286.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/r286.png -------------------------------------------------------------------------------- /public/storage/images/welcome-doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/welcome-doctor.png -------------------------------------------------------------------------------- /storage/app/public/images/logo-rsum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/logo-rsum.png -------------------------------------------------------------------------------- /public/build/assets/_plugin-vue_export-helper-c27b6911.js: -------------------------------------------------------------------------------- 1 | const s=(t,r)=>{const o=t.__vccOpts||t;for(const[c,e]of r)o[c]=e;return o};export{s as _}; 2 | -------------------------------------------------------------------------------- /public/storage/images/welcome-onboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/public/storage/images/welcome-onboard.png -------------------------------------------------------------------------------- /storage/app/public/images/welcome-doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/welcome-doctor.png -------------------------------------------------------------------------------- /storage/app/public/images/welcome-onboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/itsLeonB/rekam-medis-elektronik/HEAD/storage/app/public/images/welcome-onboard.png -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | compiled.php 2 | config.php 3 | down 4 | events.scanned.php 5 | maintenance.php 6 | routes.php 7 | routes.scanned.php 8 | schedule-* 9 | services.json 10 | -------------------------------------------------------------------------------- /app/Models/FhirModel.php: -------------------------------------------------------------------------------- 1 | 2 | import { Head } from '@inertiajs/vue3' 3 | 4 | 5 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | 2 | defineProps({ 3 | message: { 4 | type: String, 5 | }, 6 | }); 7 | 8 | 9 | 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.phpunit.cache 2 | /node_modules 3 | /public/hot 4 | /public/build 5 | /storage/*.key 6 | /vendor 7 | .env 8 | .env.testing 9 | .env.backup 10 | .env.production 11 | .phpunit.result.cache 12 | Homestead.json 13 | Homestead.yaml 14 | auth.json 15 | npm-debug.log 16 | yarn-error.log 17 | /.fleet 18 | /.idea 19 | /.vscode 20 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | indent_size = 4 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.{yml,yaml}] 15 | indent_size = 2 16 | 17 | [docker-compose.yml] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /resources/js/Components/InputLabel.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | -------------------------------------------------------------------------------- /app/Models/FailedApiRequest.php: -------------------------------------------------------------------------------- 1 | 'array']; 15 | } 16 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 2 | import AppHead from '@/Components/AppHead.vue' 3 | 4 | 5 | 15 | -------------------------------------------------------------------------------- /app/Models/Fhir/ResourceContent.php: -------------------------------------------------------------------------------- 1 | belongsTo(Resource::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | '*', 16 | 'local/*', 17 | 'satusehat/*', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /app/Http/Middleware/PreventRequestsDuringMaintenance.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 16 | ]; 17 | } 18 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrimStrings.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | 'current_password', 16 | 'password', 17 | 'password_confirmation', 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /tests/CreatesApplication.php: -------------------------------------------------------------------------------- 1 | make(Kernel::class)->bootstrap(); 18 | 19 | return $app; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustHosts.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | public function hosts(): array 15 | { 16 | return [ 17 | $this->allSubdomainsOfApplicationUrl(), 18 | ]; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Coding.php: -------------------------------------------------------------------------------- 1 | 'boolean']; 14 | 15 | public function codeable(): MorphTo 16 | { 17 | return $this->morphTo('codeable'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /resources/js/Layouts/AuthenticatedLayoutBack.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | expectsJson() ? null : route('login'); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/SimpleQuantity.php: -------------------------------------------------------------------------------- 1 | 'float']; 14 | 15 | public function simple_quantifiable(): MorphTo 16 | { 17 | return $this->morphTo('simple_quantifiable'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /resources/js/Components/DropdownLink.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 20 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Period.php: -------------------------------------------------------------------------------- 1 | 'datetime', 15 | 'end' => 'datetime', 16 | ]; 17 | 18 | public function periodable(): MorphTo 19 | { 20 | return $this->morphTo('periodable'); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Narrative.php: -------------------------------------------------------------------------------- 1 | morphTo('narrateable'); 16 | } 17 | 18 | public const STATUS = [ 19 | 'binding' => [ 20 | 'valueset' => Codesystems::NarrativeStatus 21 | ], 22 | ]; 23 | } 24 | -------------------------------------------------------------------------------- /storage/example-id-fhir/MedicationStatement-031c8acb-192e-49ff-801c-6dbb9c966efc.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "031c8acb-192e-49ff-801c-6dbb9c966efc", 3 | "medicationReference": { 4 | "reference": "Medication/8f299a19-5887-4b8e-90a2-c2c15ecbe1d1" 5 | }, 6 | "meta": { 7 | "lastUpdated": "2024-01-02T13:55:39.514276+00:00", 8 | "versionId": "MTcwNDIwMzczOTUxNDI3NjAwMA" 9 | }, 10 | "resourceType": "MedicationStatement", 11 | "status": "active", 12 | "subject": { 13 | "reference": "Patient/P02478375538" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite'; 2 | import laravel from 'laravel-vite-plugin'; 3 | import vue from '@vitejs/plugin-vue'; 4 | 5 | export default defineConfig({ 6 | plugins: [ 7 | laravel({ 8 | input: 'resources/js/app.js', 9 | refresh: true, 10 | }), 11 | vue({ 12 | template: { 13 | transformAssetUrls: { 14 | base: null, 15 | includeAbsolute: false, 16 | }, 17 | }, 18 | }), 19 | ], 20 | }); 21 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/RatioFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class RatioFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/Fhir/BackboneElements/MedicationBatch.php: -------------------------------------------------------------------------------- 1 | 'datetime']; 16 | 17 | public function medication() 18 | { 19 | return $this->belongsTo(Medication::class); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/DoseAndRateFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class DoseAndRateFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Middleware/ValidateSignature.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | protected $except = [ 15 | // 'fbclid', 16 | // 'utm_campaign', 17 | // 'utm_content', 18 | // 'utm_medium', 19 | // 'utm_source', 20 | // 'utm_term', 21 | ]; 22 | } 23 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/ConditionStageFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ConditionStageFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/TimingFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class TimingFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'event' => [fake()->dateTime()], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterDiagnosisFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class EncounterDiagnosisFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/ProcedurePerformerFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ProcedurePerformerFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/ReferenceFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ReferenceFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'display' => fake()->sentence(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Duration.php: -------------------------------------------------------------------------------- 1 | 'float']; 14 | 15 | public function durationable() 16 | { 17 | return $this->morphTo('durationable'); 18 | } 19 | 20 | public const COMPARATOR = [ 21 | 'binding' => [ 22 | 'valueset' => Valuesets::Comparators 23 | ] 24 | ]; 25 | } 26 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterParticipantFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class EncounterParticipantFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/ProcedureFocalDeviceFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ProcedureFocalDeviceFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterClassHistoryFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class EncounterClassHistoryFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/CodeableConceptFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class CodeableConceptFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'text' => fake()->sentence(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/OrganizationSearchRequest.php: -------------------------------------------------------------------------------- 1 | |string> 13 | */ 14 | public function rules(): array 15 | { 16 | return [ 17 | 'name' => 'sometimes|string', 18 | 'partof' => 'sometimes|string', 19 | ]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterHospitalizationFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class EncounterHospitalizationFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /resources/js/Components/SecondaryButton.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /public/build/assets/RiwayatPengobatanStatement-035f7a56.css: -------------------------------------------------------------------------------- 1 | .dp__theme_light{--dp-background-color: #fff;--dp-text-color: #323232;--dp-hover-color: #f3f3f3;--dp-hover-text-color: #323232;--dp-hover-icon-color: #499d8c;--dp-primary-color: #499d8c;--dp-primary-disabled-color: #6db1a3;--dp-primary-text-color: #f8f5f5;--dp-secondary-color: #499d8c;--dp-border-color: #b5b3bc;--dp-border-color-hover: #499d8c;--dp-menu-border-color: #ddd;--dp-highlight-color: #499d8c}:root{--dp-font-family: "Poppins", "Open Sans", "Helvetica Neue", sans-serif;--dp-border-radius: 10px;--dp-cell-border-radius: 12px;--dp-input-padding: 10px 12px;--dp-font-size: .875rem} 2 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/ClinicalImpressionInvestigationFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ClinicalImpressionInvestigationFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/CodeableConcept.php: -------------------------------------------------------------------------------- 1 | morphTo('codeable'); 17 | } 18 | 19 | public function coding(): MorphMany 20 | { 21 | return $this->morphMany(Coding::class, 'codeable'); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/PatientCommunicationFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class PatientCommunicationFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'preferred' => fake()->boolean(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /routes/channels.php: -------------------------------------------------------------------------------- 1 | id === (int) $id; 18 | }); 19 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/ConsentRequest.php: -------------------------------------------------------------------------------- 1 | |string> 13 | */ 14 | public function rules(): array 15 | { 16 | return [ 17 | 'patient_id' => 'required|string', 18 | 'action' => 'required|in:OPTIN,OPTOUT', 19 | 'agent' => 'required|string' 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/AnnotationFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class AnnotationFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'time' => fake()->dateTime(), 21 | 'text' => fake()->text() 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/ClinicalImpressionFindingFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class ClinicalImpressionFindingFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'basis' => fake()->sentence(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /routes/api.php: -------------------------------------------------------------------------------- 1 | get('/user', function (Request $request) { 18 | return $request->user(); 19 | }); -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Age.php: -------------------------------------------------------------------------------- 1 | 'float']; 15 | 16 | public function ageable(): MorphTo 17 | { 18 | return $this->morphTo('ageable'); 19 | } 20 | 21 | public const COMPARATOR = [ 22 | 'binding' => [ 23 | 'valueset' => Valuesets::Comparators 24 | ] 25 | ]; 26 | } 27 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/MedicationRequestDispenseRequestInitialFillFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class MedicationRequestDispenseRequestInitialFillFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | // 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/MedicationRequestSubstitutionFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class MedicationRequestSubstitutionFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'allowed_boolean' => fake()->boolean(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/LocationSearchRequest.php: -------------------------------------------------------------------------------- 1 | |string> 13 | */ 14 | public function rules(): array 15 | { 16 | return [ 17 | 'identifier' => 'sometimes|string', 18 | 'name' => 'sometimes|string', 19 | 'organization' => 'sometimes|string', 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/QuestionnaireResponseItemAnswerFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class QuestionnaireResponseItemAnswerFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'value_boolean' => fake()->boolean(), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeders/codesystems/UCUMSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/ucum.csv'; 13 | $this->tablename = 'codesystem_ucum'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Quantity.php: -------------------------------------------------------------------------------- 1 | 'float']; 15 | 16 | public function quantifiable(): MorphTo 17 | { 18 | return $this->morphTo('quantifiable'); 19 | } 20 | 21 | public const COMPARATOR = [ 22 | 'binding' => [ 23 | 'valueset' => Valuesets::Comparators 24 | ] 25 | ]; 26 | } 27 | -------------------------------------------------------------------------------- /database/seeders/codesystems/BCP13Seeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/bcp13.csv'; 13 | $this->tablename = 'codesystem_bcp13'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/BCP47Seeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/bcp47.csv'; 13 | $this->tablename = 'codesystem_bcp47'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/ICD10Seeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/icd10.csv'; 13 | $this->tablename = 'codesystem_icd10'; 14 | $this->timestamps = false; 15 | $this->delimiter = ';'; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/LoincSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/loinc.csv'; 13 | $this->tablename = 'codesystem_loinc'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/ISO3166Seeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/iso3166.csv'; 13 | $this->tablename = 'codesystem_iso3166'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /routes/console.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 19 | })->purpose('Display an inspiring quote'); 20 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Annotation.php: -------------------------------------------------------------------------------- 1 | 'datetime']; 15 | 16 | public function annotable() 17 | { 18 | return $this->morphTo('annotable'); 19 | } 20 | 21 | public function authorReference(): MorphOne 22 | { 23 | return $this->morphOne(Reference::class, 'referenceable'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/MedicationRequestDispenseRequestFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class MedicationRequestDispenseRequestFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'number_of_repeats_allowed' => fake()->randomDigit(2), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeders/codesystems/V3ActCodeSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/v3actcode.csv'; 13 | $this->tablename = 'codesystem_v3actcode'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/QuestionnaireResponseItemFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class QuestionnaireResponseItemFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'link_id' => fake()->word(), 21 | 'text' => fake()->sentence(), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/ServiceTypeSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/servicetype.csv'; 13 | $this->tablename = 'codesystem_servicetype'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/ObservationSearchRequest.php: -------------------------------------------------------------------------------- 1 | |string> 13 | */ 14 | public function rules(): array 15 | { 16 | return [ 17 | 'subject' => 'sometimes|required_with:based-on|string', 18 | 'encounter' => 'sometimes|string', 19 | 'based-on' => 'sometimes|string', 20 | ]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/Http/Requests/ProfileUpdateRequest.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | public function rules(): array 17 | { 18 | return [ 19 | 'name' => ['string', 'max:255'], 20 | 'email' => ['email', 'max:255', Rule::unique(User::class)->ignore($this->user()->id)], 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews -Indexes 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Handle Authorization Header 9 | RewriteCond %{HTTP:Authorization} . 10 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 11 | 12 | # Redirect Trailing Slashes If Not A Folder... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_URI} (.+)/$ 15 | RewriteRule ^ %1 [L,R=301] 16 | 17 | # Send Requests To Front Controller... 18 | RewriteCond %{REQUEST_FILENAME} !-d 19 | RewriteCond %{REQUEST_FILENAME} !-f 20 | RewriteRule ^ index.php [L] 21 | 22 | -------------------------------------------------------------------------------- /app/Models/Fhir/BackboneElements/LocationPosition.php: -------------------------------------------------------------------------------- 1 | 'double', 17 | 'latitude' => 'double', 18 | 'altitude' => 'double', 19 | ]; 20 | 21 | public $timestamps = false; 22 | 23 | public function location() 24 | { 25 | return $this->belongsTo(Location::class); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ParticipantRolesSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/participantroles.csv'; 13 | $this->tablename = 'valueset_participantroles'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/SNOMEDCTBodySiteSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/snomedctbodysite.csv'; 13 | $this->tablename = 'valueset_snomedctbodysite'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/Fhir/ResourceController.php: -------------------------------------------------------------------------------- 1 | json(['error' => 'Invalid resource type.'], 400); 16 | } 17 | 18 | return response()->json(Resource::where('res_type', '=', $res_type)->get(), 200); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/PeriodFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class PeriodFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'start' => fake()->dateTimeBetween('-2 year', 'now'), 22 | 'end' => fake()->dateTimeBetween('now', '+1 year'), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/codesystems/ICD9CMProcedureSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/icd9cmprocedure.csv'; 13 | $this->tablename = 'codesystem_icd9cmprocedure'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/ClinicalSpecialtySeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/clinicalspecialty.csv'; 13 | $this->tablename = 'codesystem_clinicalspecialty'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ConditionStageTypeSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/condition_stagetype.csv'; 13 | $this->tablename = 'valueset_conditionstagetype'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/EncounterReasonCodeSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/encounter_reasoncode.csv'; 13 | $this->tablename = 'valueset_encounterreasoncode'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/codesystems/AdministrativeAreaSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/codesystems/administrativearea.csv'; 13 | $this->tablename = 'codesystem_administrativearea'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /tests/Unit/RouteTest.php: -------------------------------------------------------------------------------- 1 | get('/profile'); 16 | 17 | $response->assertStatus(302); 18 | 19 | $response->assertRedirect('/login'); 20 | } 21 | 22 | public function test_auth_route(): void 23 | { 24 | $this->actingAs(User::factory()->create()); 25 | 26 | $response = $this->get('/profile'); 27 | 28 | $response->assertStatus(200); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/PatientContactFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class PatientContactFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'gender' => fake()->randomElement(PatientContact::GENDER['binding']['valueset']), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/EncounterFactory.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'resource_id' => Resource::factory()->create(['res_type' => 'Encounter']), 21 | 'status' => fake()->randomElement(Encounter::STATUS['binding']['valueset']['code']), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/PractitionerFactory.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | public function definition(): array 17 | { 18 | return [ 19 | 'resource_id' => Resource::factory()->create(['res_type' => 'Practitioner']), 20 | 'gender' => fake()->randomElement(Practitioner::GENDER['binding']['valueset']), 21 | ]; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/seeders/valuesets/RiwayatPenyakitKeluargaSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/riwayatpenyakitkeluarga.csv'; 13 | $this->tablename = 'valueset_riwayatpenyakitkeluarga'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/RiwayatPenyakitPribadiSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/riwayatpenyakitpribadi.csv'; 13 | $this->tablename = 'valueset_riwayatpenyakitpribadi'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/AllergyReactionSubstanceSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/allergy_reactionsubstance.csv'; 13 | $this->tablename = 'valueset_allergy_reactionsubstance'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/NarrativeFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class NarrativeFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'status' => fake()->randomElement(Narrative::STATUS['binding']['valueset']['code']), 22 | 'div' => fake()->paragraph(), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ProcedureDeviceActionCodesSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/proceduredeviceactioncodes.csv'; 13 | $this->tablename = 'valueset_proceduredeviceactioncodes'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterLocationFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class EncounterLocationFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'status' => fake()->randomElement(EncounterLocation::STATUS['binding']['valueset']['code']), 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ProcedureNotPerformedReasonSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/procedurenotperformedreason.csv'; 13 | $this->tablename = 'valueset_procedurenotperformedreason'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ProcedurePerformerRoleCodesSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/procedureperformerrolecodes.csv'; 13 | $this->tablename = 'valueset_procedureperformerrolecodes'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/ConditionFactory.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | public function definition(): array 17 | { 18 | return [ 19 | 'resource_id' => Resource::factory()->create(['res_type' => 'Condition']), 20 | 'onset_date_time' => fake()->dateTime(), 21 | 'abatement_date_time' => fake()->dateTime(), 22 | 'recorded_date' => fake()->dateTime(), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/seeders/valuesets/ObservationRefRangeAppliesToSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/observation_refrangeappliesto.csv'; 13 | $this->tablename = 'valueset_observation_refrangeappliesto'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/ResourceFactory.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function definition(): array 16 | { 17 | $resTypes = array_keys(config('app.resource_type_map')); 18 | $resType = $resTypes[array_rand($resTypes)]; 19 | 20 | return [ 21 | 'satusehat_id' => fake()->uuid(), 22 | 'res_type' => $resType, 23 | 'res_version' => 1, 24 | 'fhir_ver' => 'R4' 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2023_11_25_203246_create_codesystem_iso3166_table.php: -------------------------------------------------------------------------------- 1 | char('code', 2)->primary(); 16 | $table->string('display', 52); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('codesystem_iso3166'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/DosageFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class DosageFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'sequence' => fake()->randomDigitNotNull(), 21 | 'text' => fake()->text(), 22 | 'patient_instruction' => fake()->text(), 23 | 'as_needed_boolean' => fake()->boolean(), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Ratio.php: -------------------------------------------------------------------------------- 1 | morphTo('rateable'); 17 | } 18 | 19 | public function numerator(): MorphOne 20 | { 21 | return $this->morphOne(Quantity::class, 'quantifiable'); 22 | } 23 | 24 | public function denominator(): MorphOne 25 | { 26 | return $this->morphOne(Quantity::class, 'quantifiable'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/EncounterStatusHistoryFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class EncounterStatusHistoryFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'status' => fake()->randomElement(EncounterStatusHistory::STATUS['binding']['valueset']['code']) 22 | ]; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/LocationPositionFactory.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class LocationPositionFactory extends Factory 11 | { 12 | /** 13 | * Define the model's default state. 14 | * 15 | * @return array 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'longitude' => fake()->randomFloat(6, 0, 180), 21 | 'latitude' => fake()->randomFloat(6, 0, 90), 22 | 'altitude' => fake()->randomFloat(6, 0, 1000), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2023_11_30_204916_create_valueset_dosage_site_table.php: -------------------------------------------------------------------------------- 1 | string('code', 9)->primary(); 16 | $table->string('display', 124); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_dosage_site'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_12_08_135905_create_valueset_participantroles_table.php: -------------------------------------------------------------------------------- 1 | string('code', 18); 16 | $table->string('display', 74); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_participantroles'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /resources/js/Components/BackButton.vue: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /database/migrations/2023_10_31_072450_create_codesystem_servicetype_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('code')->primary(); 16 | $table->string('display'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('codesystem_servicetype'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_12_04_135224_create_codesystem_ucum_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('code', 20)->index(); 17 | $table->string('unit', 72); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_ucum'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /tests/Unit/SeederTest.php: -------------------------------------------------------------------------------- 1 | run(); 21 | $this->assertTrue(true); 22 | } 23 | 24 | public function test_dummy_seeder(): void 25 | { 26 | $seeder = new DummyDataSeeder(); 27 | $seeder->run(); 28 | $this->assertTrue(true); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | protected $dontFlash = [ 16 | 'current_password', 17 | 'password', 18 | 'password_confirmation', 19 | ]; 20 | 21 | /** 22 | * Register the exception handling callbacks for the application. 23 | */ 24 | public function register(): void 25 | { 26 | $this->reportable(function (Throwable $e) { 27 | // 28 | }); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2023_12_04_014053_create_valueset_snomedctbodysite_table.php: -------------------------------------------------------------------------------- 1 | string('code', 17)->primary(); 16 | $table->string('display', 143); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_snomedctbodysite'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_12_01_230719_create_codesystem_clinicalspecialty_table.php: -------------------------------------------------------------------------------- 1 | char('code', 4)->primary(); 16 | $table->string('display', 79); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('codesystem_clinicalspecialty'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /resources/js/Components/Checkbox.vue: -------------------------------------------------------------------------------- 1 | 26 | 27 | 35 | -------------------------------------------------------------------------------- /app/Http/Middleware/TrustProxies.php: -------------------------------------------------------------------------------- 1 | |string|null 14 | */ 15 | protected $proxies; 16 | 17 | /** 18 | * The headers that should be used to detect proxies. 19 | * 20 | * @var int 21 | */ 22 | protected $headers = 23 | Request::HEADER_X_FORWARDED_FOR | 24 | Request::HEADER_X_FORWARDED_HOST | 25 | Request::HEADER_X_FORWARDED_PORT | 26 | Request::HEADER_X_FORWARDED_PROTO | 27 | Request::HEADER_X_FORWARDED_AWS_ELB; 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2023_10_31_084614_create_valueset_encounterreasoncode_table.php: -------------------------------------------------------------------------------- 1 | char('code', 9)->primary(); 16 | $table->string('display', 198); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_encounterreasoncode'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_11_22_155358_create_valueset_conditionstagetype_table.php: -------------------------------------------------------------------------------- 1 | string('code', 16)->primary(); 16 | $table->string('display', 201); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_conditionstagetype'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/CompositionAttesterFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class CompositionAttesterFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'mode' => fake()->randomElement(CompositionAttester::MODE['binding']['valueset']['code']), 22 | 'time' => fake()->dateTime(), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/CompositionSectionFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class CompositionSectionFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'title' => fake()->sentence(), 22 | 'mode' => fake()->randomElement(CompositionSection::MODE['binding']['valueset']['code']), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2023_10_31_163004_create_codesystem_icd10_table.php: -------------------------------------------------------------------------------- 1 | char('code', 6)->primary(); 16 | $table->string('display_en'); 17 | $table->string('display_id'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_icd10'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_11_04_205903_create_valueset_procedure_reasoncode_table.php: -------------------------------------------------------------------------------- 1 | unsignedBigInteger('code')->primary(); 16 | $table->string('display'); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_procedure_reasoncode'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_12_22_023235_create_codesystem_bcp13_table.php: -------------------------------------------------------------------------------- 1 | string('code', 73); 16 | $table->string('display', 78); 17 | $table->string('extension', 12); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_bcp13'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/seeders/valuesets/MedicationIngredientStrengthDenominatorSeeder.php: -------------------------------------------------------------------------------- 1 | file = '/database/seeders/csvs/valuesets/medication_ingredientstrengthdenominator.csv'; 13 | $this->tablename = 'valueset_medication_ingredientstrengthdenominator'; 14 | $this->timestamps = false; 15 | $this->delimiter = ','; 16 | } 17 | 18 | public function run() 19 | { 20 | // Recommended when importing larger CSVs 21 | DB::disableQueryLog(); 22 | parent::run(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationPromptController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail() 20 | ? redirect()->intended(RouteServiceProvider::HOME) 21 | : Inertia::render('Auth/VerifyEmail', ['status' => session('status')]); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /database/migrations/2023_12_04_013215_create_valueset_riwayatpenyakitpribadi_table.php: -------------------------------------------------------------------------------- 1 | string('code', 18)->primary(); 16 | $table->string('display', 98); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_riwayatpenyakitpribadi'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /resources/views/app.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{ config('app.name', 'Laravel') }} 8 | 9 | 10 | 11 | 12 | 13 | 14 | @routes 15 | @vite(['resources/js/app.js', "resources/js/Pages/{$page['component']}.vue"]) 16 | @inertiaHead 17 | 18 | 19 | @inertia 20 | 21 | 22 | -------------------------------------------------------------------------------- /database/migrations/2023_11_04_013121_create_codesystem_loinc_table.php: -------------------------------------------------------------------------------- 1 | string('code', 8)->primary(); 16 | $table->string('display', 246); 17 | $table->string('scale_typ', 7); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_loinc'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_11_06_200803_create_valueset_proceduredeviceactioncodes.php: -------------------------------------------------------------------------------- 1 | char('code', 15)->primary(); 16 | $table->string('display', 86); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_proceduredeviceactioncodes'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /database/migrations/2023_11_29_215105_create_codesystem_bcp47_table.php: -------------------------------------------------------------------------------- 1 | string('code', 5)->primary(); 16 | $table->string('display', 10); 17 | $table->string('definition', 55); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_bcp47'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_12_04_013222_create_valueset_riwayatpenyakitkeluarga_table.php: -------------------------------------------------------------------------------- 1 | string('code', 18)->primary(); 16 | $table->string('display', 110); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_riwayatpenyakitkeluarga'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | protected $policies = [ 17 | // 18 | ]; 19 | 20 | /** 21 | * Register any authentication / authorization services. 22 | */ 23 | public function boot(): void 24 | { 25 | Gate::before(function ($user, $ability) { 26 | return $user->hasRole('admin') ? true : null; 27 | }); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/ComplexExtension.php: -------------------------------------------------------------------------------- 1 | 'array']; 16 | 17 | public function complexExtendable(): MorphTo 18 | { 19 | return $this->morphTo('complex_extendable'); 20 | } 21 | 22 | public function extension($url): MorphMany 23 | { 24 | return $this->morphMany(Extension::class, 'extendable') 25 | ->where('url', $url); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/factories/PractitionerUserFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class PractitionerUserFactory extends Factory 13 | { 14 | /** 15 | * Define the model's default state. 16 | * 17 | * @return array 18 | */ 19 | public function definition(): array 20 | { 21 | $user = User::factory()->create(); 22 | $practitioner = Practitioner::factory()->create(); 23 | return [ 24 | 'user_id' => $user->id, 25 | 'practitioner_id' => $practitioner->id 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2023_11_06_205144_create_valueset_procedurenotperformedreason_table.php: -------------------------------------------------------------------------------- 1 | char('code', 17)->primary(); 16 | $table->string('display', 124); 17 | }); 18 | } 19 | 20 | /** 21 | * Reverse the migrations. 22 | */ 23 | public function down(): void 24 | { 25 | Schema::dropIfExists('valueset_procedurenotperformedreason'); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/EmailVerificationNotificationController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 18 | return redirect()->intended(RouteServiceProvider::HOME); 19 | } 20 | 21 | $request->user()->sendEmailVerificationNotification(); 22 | 23 | return back()->with('status', 'verification-link-sent'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Reference.php: -------------------------------------------------------------------------------- 1 | morphTo('referenceable'); 18 | } 19 | 20 | public function identifier(): MorphOne 21 | { 22 | return $this->morphOne(Identifier::class, 'identifiable'); 23 | } 24 | 25 | public const TYPE = [ 26 | 'binding' => [ 27 | 'valueset' => Codesystems::ResourceType 28 | ] 29 | ]; 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_reset_tokens_table.php: -------------------------------------------------------------------------------- 1 | string('email')->primary(); 16 | $table->string('token'); 17 | $table->timestamp('created_at')->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('password_reset_tokens'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /resources/js/Components/TextInput.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /database/migrations/2023_11_04_214525_create_codesystem_icd9cm_procedure_table.php: -------------------------------------------------------------------------------- 1 | char('code', 4)->primary(); 16 | $table->string('display'); 17 | $table->text('definition'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_icd9cm_procedure'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102723.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102723", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102723" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T10:59:48.626894+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3MzE4ODYyNjg5NDAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Anang", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102734.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102734", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102734" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T11:00:54.720631+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3MzI1NDcyMDYzMTAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Dodi", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102745.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102745", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102745" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T11:05:37.879975+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3MzUzNzg3OTk3NTAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Mardigu", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102756.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102756", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102756" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T11:06:36.858381+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3MzU5Njg1ODM4MTAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Budi", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102767.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102767", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102767" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T11:11:12.338686+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3Mzg3MjMzODY4NjAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Toni", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102778.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102778", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102778" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T12:18:53.600353+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI3NzkzMzYwMDM1MzAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Stark", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102803.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102803", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102803" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T13:13:49.966892+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI4MTIyOTk2Njg5MjAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Hulk", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102814.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102814", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102814" 15 | } 16 | ], 17 | "meta": { 18 | "lastUpdated": "2023-03-08T13:18:43.477704+00:00", 19 | "profile": [ 20 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 21 | ], 22 | "versionId": "MTY3ODI4MTUyMzQ3NzcwNDAwMA" 23 | }, 24 | "name": [ 25 | { 26 | "text": "Roni", 27 | "use": "official" 28 | } 29 | ], 30 | "resourceType": "Patient" 31 | } -------------------------------------------------------------------------------- /resources/js/Components/TextArea.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | -------------------------------------------------------------------------------- /resources/js/app.js: -------------------------------------------------------------------------------- 1 | import './bootstrap'; 2 | import '../css/app.css'; 3 | 4 | import { createApp, h } from 'vue'; 5 | import { createInertiaApp } from '@inertiajs/vue3'; 6 | import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; 7 | import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m'; 8 | 9 | const appName = "RME RS Unipdu Medika"; 10 | 11 | createInertiaApp({ 12 | title: (title) => `${title}${appName}`, 13 | resolve: (name) => resolvePageComponent(`./Pages/${name}.vue`, import.meta.glob('./Pages/**/*.vue')), 14 | setup({ el, App, props, plugin }) { 15 | return createApp({ render: () => h(App, props) }) 16 | .use(plugin) 17 | .use(ZiggyVue, Ziggy) 18 | .mount(el); 19 | }, 20 | progress: { 21 | color: '#4B5563', 22 | }, 23 | }); 24 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('app:retry-failed-api-requests')->hourly(); 16 | $schedule->command('backup:clean')->monthly(); 17 | $schedule->command('backup:run')->monthly(); 18 | } 19 | 20 | /** 21 | * Register the commands for the application. 22 | */ 23 | protected function commands(): void 24 | { 25 | $this->load(__DIR__ . '/Commands'); 26 | 27 | require base_path('routes/console.php'); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/QuestionnaireResponseFactory.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'resource_id' => Resource::factory()->create(['res_type' => 'QuestionnaireResponse']), 21 | 'status' => fake()->randomElement(QuestionnaireResponse::STATUS['binding']['valueset']['code']), 22 | 'authored' => fake()->dateTime(), 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2023_12_05_003547_create_codesystem_icd9cmprocedure_table.php: -------------------------------------------------------------------------------- 1 | string('code', 5)->primary(); 16 | $table->string('display', 24); 17 | $table->string('definition', 163); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_icd9cmprocedure'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_12_06_122652_create_codesystem_v3actcode_table.php: -------------------------------------------------------------------------------- 1 | string('code', 42)->primary(); 16 | $table->string('display', 89)->nullable(); 17 | $table->string('definition', 2402)->nullable(); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('codesystem_v3actcode'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/ProcedureFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | public function definition(): array 19 | { 20 | $status = fake()->randomElement(Procedure::STATUS['binding']['valueset']['code']); 21 | 22 | return [ 23 | 'resource_id' => Resource::factory()->create(['res_type' => 'Procedure']), 24 | 'status' => $status, 25 | 'performed_date_time' => fake()->dateTime() 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2023_11_06_170956_create_valueset_procedureperformerrolecodes_table.php: -------------------------------------------------------------------------------- 1 | char('code', 18)->primary(); 16 | $table->string('display'); 17 | $table->string('definition'); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('valueset_procedureperformerrolecodes'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_12_31_211125_create_valueset_allergy_reactionsubstance_table.php: -------------------------------------------------------------------------------- 1 | string('code', 15)->primary(); 16 | $table->string('display', 238); 17 | $table->string('system', 56); 18 | }); 19 | } 20 | 21 | /** 22 | * Reverse the migrations. 23 | */ 24 | public function down(): void 25 | { 26 | Schema::dropIfExists('valueset_allergy_reactionsubstance'); 27 | } 28 | }; 29 | -------------------------------------------------------------------------------- /database/migrations/2023_12_23_123347_create_ranges_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('rangeable_id'); 17 | $table->string('rangeable_type'); 18 | $table->string('attr_type')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('ranges'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_12_23_201514_create_ratios_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('rateable_id'); 17 | $table->string('rateable_type'); 18 | $table->string('attr_type')->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('ratios'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "type": "module", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build" 7 | }, 8 | "devDependencies": { 9 | "@inertiajs/vue3": "^1.0.0", 10 | "@tailwindcss/forms": "^0.5.3", 11 | "@vitejs/plugin-vue": "^4.0.0", 12 | "autoprefixer": "^10.4.12", 13 | "axios": "^1.1.2", 14 | "laravel-vite-plugin": "^0.7.5", 15 | "postcss": "^8.4.18", 16 | "tailwindcss": "^3.2.1", 17 | "vite": "^4.0.0", 18 | "vue": "^3.2.41" 19 | }, 20 | "dependencies": { 21 | "@vueform/multiselect": "^2.6.6", 22 | "@vuepic/vue-datepicker": "^7.4.1", 23 | "apexcharts": "^3.45.1", 24 | "lodash": "^4.17.21", 25 | "vue-multiselect": "^3.0.0-beta.3", 26 | "vue3-apexcharts": "^1.4.4" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/PatientSearchRequest.php: -------------------------------------------------------------------------------- 1 | |string> 15 | */ 16 | public function rules(): array 17 | { 18 | return [ 19 | 'identifier' => 'sometimes|string', 20 | 'gender' => ['sometimes', Rule::in(Patient::GENDER['binding']['valueset'])], 21 | 'birthdate' => 'sometimes|required_with:gender|date', 22 | 'name' => 'sometimes|required_with:gender|string', 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/Range.php: -------------------------------------------------------------------------------- 1 | morphTo('rangeable'); 17 | } 18 | 19 | public function low(): MorphOne 20 | { 21 | return $this->morphOne(SimpleQuantity::class, 'simple_quantifiable') 22 | ->where('attr_type', 'low'); 23 | } 24 | 25 | public function high(): MorphOne 26 | { 27 | return $this->morphOne(SimpleQuantity::class, 'simple_quantifiable') 28 | ->where('attr_type', 'high'); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /resources/js/Components/DeleteButton.vue: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Models/Fhir/BackboneElements/PatientLink.php: -------------------------------------------------------------------------------- 1 | belongsTo(Patient::class); 22 | } 23 | 24 | public function other(): MorphOne 25 | { 26 | return $this->morphOne(Reference::class, 'referenceable'); 27 | } 28 | 29 | public const TYPE = [ 30 | 'binding' => [ 31 | 'valueset' => Valuesets::LinkType 32 | ] 33 | ]; 34 | } 35 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/SampledData.php: -------------------------------------------------------------------------------- 1 | 'float', 17 | 'factor' => 'float', 18 | 'lower_limit' => 'float', 19 | 'upper_limit' => 'float', 20 | ]; 21 | 22 | public function sampleable(): MorphTo 23 | { 24 | return $this->morphTo('sampleable'); 25 | } 26 | 27 | public function origin(): MorphOne 28 | { 29 | return $this->morphOne(SimpleQuantity::class, 'simple_quantifiable'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/AllergyIntoleranceReactionFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class AllergyIntoleranceReactionFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'description' => fake()->paragraph(), 22 | 'onset' => fake()->dateTime(), 23 | 'severity' => fake()->randomElement(AllergyIntoleranceReaction::SEVERITY['binding']['valueset']['code']), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/MedicationStatementFactory.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'resource_id' => Resource::factory()->create(['res_type' => 'MedicationStatement']), 21 | 'status' => fake()->randomElement(MedicationStatement::STATUS['binding']['valueset']['code']), 22 | 'effective_date_time' => fake()->dateTime(), 23 | 'date_asserted' => fake()->dateTime(), 24 | ]; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/PractitionerSearchRequest.php: -------------------------------------------------------------------------------- 1 | |string> 15 | */ 16 | public function rules(): array 17 | { 18 | return [ 19 | 'identifier' => 'sometimes|string', 20 | 'name' => 'sometimes|string', 21 | 'gender' => ['sometimes', 'required_with:name', Rule::in(Practitioner::GENDER['binding']['valueset'])], 22 | 'birthdate' => 'sometimes|required_with:name|string', 23 | ]; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /database/migrations/2023_10_16_083704_create_condition_stage_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('condition_id'); 17 | $table->index('condition_id'); 18 | $table->foreign('condition_id')->references('id')->on('condition')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('condition_stage'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_12_23_235016_create_dose_and_rates_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('dosage_id'); 17 | $table->index('dosage_id'); 18 | $table->foreign('dosage_id')->references('id')->on('dosages'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('dose_and_rates'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/CompositionFactory.php: -------------------------------------------------------------------------------- 1 | 18 | */ 19 | public function definition(): array 20 | { 21 | return [ 22 | 'resource_id' => Resource::factory()->create(['res_type' => 'Composition']), 23 | 'status' => fake()->randomElement(Composition::STATUS['binding']['valueset']['code']), 24 | 'date' => fake()->dateTime(), 25 | 'title' => fake()->sentence(), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2023_10_16_083859_create_condition_evidence_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('condition_id'); 17 | $table->index('condition_id'); 18 | $table->foreign('condition_id')->references('id')->on('condition')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('condition_evidence'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_20_114827_create_procedure_performer_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('procedure_id'); 17 | $table->index('procedure_id'); 18 | $table->foreign('procedure_id')->references('id')->on('procedure')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('procedure_performer'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_22_151152_create_composition_event_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('composition_id'); 17 | $table->index('composition_id'); 18 | $table->foreign('composition_id')->references('id')->on('composition')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('composition_event'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_090754_create_encounter_participants_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('encounter_participant'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/ContactPoint.php: -------------------------------------------------------------------------------- 1 | morphTo('contact_pointable'); 17 | } 18 | 19 | public function period(): MorphOne 20 | { 21 | return $this->morphOne(Period::class, 'periodable'); 22 | } 23 | 24 | public const SYSTEM = [ 25 | 'binding' => [ 26 | 'valueset' => Codesystems::ContactPointSystem 27 | ] 28 | ]; 29 | 30 | public const USE = [ 31 | 'binding' => [ 32 | 'valueset' => Codesystems::ContactPointUse 33 | ] 34 | ]; 35 | } 36 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/SimpleQuantityFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class SimpleQuantityFactory extends Factory 13 | { 14 | /** 15 | * Define the model's default state. 16 | * 17 | * @return array 18 | */ 19 | public function definition(): array 20 | { 21 | $code = DB::table(Codesystems::UCUM['table'])->inRandomOrder()->first(); 22 | 23 | return [ 24 | 'value' => fake()->randomFloat(2, 0, 1000), 25 | 'unit' => $code->unit, 26 | 'system' => Codesystems::UCUM['system'], 27 | 'code' => $code->code, 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_06_140238_create_patient_link_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('patient_id'); 17 | $table->index('patient_id'); 18 | $table->foreign('patient_id')->references('id')->on('patient')->onDelete('cascade'); 19 | $table->string('type'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('patient_link'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_085627_create_encounter_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('resource_id'); 17 | $table->index('resource_id'); 18 | $table->foreign('resource_id')->references('id')->on('resource')->onDelete('cascade'); 19 | $table->string('status'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('encounter'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_090652_create_encounter_class_history_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('encounter_class_history'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_20_115728_create_procedure_focal_device_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('procedure_id'); 17 | $table->index('procedure_id'); 18 | $table->foreign('procedure_id')->references('id')->on('procedure')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('procedure_focal_device'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_12_23_201457_create_timings_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->json('event')->nullable(); 17 | $table->unsignedBigInteger('timeable_id'); 18 | $table->string('timeable_type'); 19 | $table->string('attr_type')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('timings'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/migrations/2024_01_03_204112_create_failed_api_requests_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('method'); 17 | $table->string('res_type'); 18 | $table->string('satusehat_id')->nullable(); 19 | $table->json('data'); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('failed_api_requests'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 24 | return redirect(RouteServiceProvider::HOME); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_09_121639_create_organization_contact_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('organization_id'); 17 | $table->index('organization_id'); 18 | $table->foreign('organization_id')->references('id')->on('organization')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('organization_contact'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/PatientFactory.php: -------------------------------------------------------------------------------- 1 | 15 | */ 16 | public function definition(): array 17 | { 18 | return [ 19 | 'resource_id' => Resource::factory()->create(['res_type' => 'Patient']), 20 | 'active' => fake()->boolean(), 21 | 'gender' => fake()->randomElement(Patient::GENDER['binding']['valueset']), 22 | 'birth_date' => fake()->date(), 23 | 'deceased_boolean' => fake()->boolean(), 24 | 'multiple_birth_integer' => fake()->randomDigit(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_232752_create_codesystem_resourcetype_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('code', 33)->nullable(); 17 | $table->string('display', 33)->nullable(); 18 | $table->string('definition', 1545)->nullable(); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('codesystem_resourcetype'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /storage/example-id-fhir/Patient-P02029102825.json: -------------------------------------------------------------------------------- 1 | { 2 | "active": true, 3 | "birthDate": "1920-02-28", 4 | "id": "P02029102825", 5 | "identifier": [ 6 | { 7 | "system": "https://fhir.kemkes.go.id/id/nik-ibu", 8 | "use": "official", 9 | "value": "367400001111222" 10 | }, 11 | { 12 | "system": "https://fhir.kemkes.go.id/id/ihs-number", 13 | "use": "official", 14 | "value": "P02029102825" 15 | } 16 | ], 17 | "language": "id", 18 | "meta": { 19 | "lastUpdated": "2023-10-17T06:26:21.585017+00:00", 20 | "profile": [ 21 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient|4.0.1", 22 | "https://fhir.kemkes.go.id/r4/StructureDefinition/Patient" 23 | ], 24 | "versionId": "MTY5NzUyMzk4MTU4NTAxNzAwMA" 25 | }, 26 | "name": [ 27 | { 28 | "text": "Sambo", 29 | "use": "official" 30 | } 31 | ], 32 | "resourceType": "Patient" 33 | } -------------------------------------------------------------------------------- /database/migrations/2023_10_20_153348_create_medication_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('resource_id'); 17 | $table->index('resource_id'); 18 | $table->foreign('resource_id')->references('id')->on('resource')->onDelete('cascade'); 19 | $table->string('status')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('medication'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_11_22_155756_create_valueset_observation_refrangeappliesto_table.php: -------------------------------------------------------------------------------- 1 | string('code', 9)->primary(); 16 | $table->string('system', 45); 17 | $table->string('display', 43); 18 | $table->string('definition', 122)->nullable(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('valueset_observation_refrangeappliesto'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/seeders/UserSeeder.php: -------------------------------------------------------------------------------- 1 | 'Ellion Blessan', 18 | 'email' => 'ellionblessan@gmail.com', 19 | 'password' => '12345678', 20 | 'remember_token' => Str::random(10) 21 | ]); 22 | 23 | $leon->assignRole('perekammedis'); 24 | 25 | $mando = User::create([ 26 | 'name' => 'Yushi', 27 | 'email' => 'armandorizqy2326@gmail.com', 28 | 'password' => '12345678', 29 | 'remember_token' => Str::random(10) 30 | ]); 31 | 32 | $mando->assignRole('perekammedis'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/PasswordController.php: -------------------------------------------------------------------------------- 1 | validate([ 19 | 'current_password' => ['required', 'current_password'], 20 | 'password' => ['required', Password::defaults(), 'confirmed'], 21 | ]); 22 | 23 | $request->user()->update([ 24 | 'password' => Hash::make($validated['password']), 25 | 'password_changed_at' => now() 26 | ]); 27 | 28 | return back(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/factories/fhir/backboneelements/LocationHoursOfOperationFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class LocationHoursOfOperationFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'days_of_week' => [fake()->randomElement(LocationHoursOfOperation::DAYS_OF_WEEK['binding']['valueset']['code'])], 22 | 'all_day' => fake()->boolean(), 23 | 'opening_time' => fake()->time(), 24 | 'closing_time' => fake()->time(), 25 | ]; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /database/migrations/2023_09_21_163331_create_practitioner_qualification_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('practitioner_id'); 17 | $table->index('practitioner_id'); 18 | $table->foreign('practitioner_id')->references('id')->on('practitioner')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('practitioner_qualification'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_230834_create_codeable_concepts_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('text')->nullable(); 17 | $table->unsignedBigInteger('codeable_id'); 18 | $table->string('codeable_type'); 19 | $table->string('attr_type')->nullable(); 20 | $table->timestamps(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('codeable_concepts'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/migrations/2023_12_22_233221_create_encounter_hospitalizations_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter'); 19 | $table->timestamps(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('encounter_hospitalizations'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Models/Fhir/Datatypes/HumanName.php: -------------------------------------------------------------------------------- 1 | 'array', 17 | 'prefix' => 'array', 18 | 'suffix' => 'array' 19 | ]; 20 | 21 | public function humanNameable(): MorphTo 22 | { 23 | return $this->morphTo('human_nameable'); 24 | } 25 | 26 | public function period(): MorphOne 27 | { 28 | return $this->morphOne(Period::class, 'periodable'); 29 | } 30 | 31 | public const USE = [ 32 | 'binding' => [ 33 | 'valueset' => Codesystems::NameUse 34 | ] 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_091033_create_encounter_location_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter')->onDelete('cascade'); 19 | $table->string('status')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('encounter_location'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_12_24_112959_create_narratives_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('status'); 17 | $table->text('div'); 18 | $table->unsignedBigInteger('narrateable_id'); 19 | $table->string('narrateable_type'); 20 | $table->string('attr_type')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('narratives'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2019_08_19_000000_create_failed_jobs_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('uuid')->unique(); 17 | $table->text('connection'); 18 | $table->text('queue'); 19 | $table->longText('payload'); 20 | $table->longText('exception'); 21 | $table->timestamp('failed_at')->useCurrent(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('failed_jobs'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2023_10_06_140237_create_patient_communication_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('patient_id'); 17 | $table->index('patient_id'); 18 | $table->foreign('patient_id')->references('id')->on('patient')->onDelete('cascade'); 19 | $table->boolean('preferred')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('patient_communication'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_17_062904_create_obs_comp_ref_range_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('obs_comp_id'); 17 | $table->index('obs_comp_id'); 18 | $table->foreign('obs_comp_id')->references('id')->on('observation_component')->onDelete('cascade'); 19 | $table->text('text')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('obs_comp_ref_range'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_25_050124_create_clinical_impression_investigation_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('impression_id'); 17 | $table->index('impression_id'); 18 | $table->foreign('impression_id')->references('id')->on('clinical_impression')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('clinical_impression_investigation'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_11_07_144856_create_valueset_medication_ingredientstrengthdenominator_table.php: -------------------------------------------------------------------------------- 1 | char('code', 10)->primary(); 16 | $table->string('system', 58); 17 | $table->string('display', 45); 18 | $table->string('definition', 352)->nullable(); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('valueset_medication_ingredientstrengthdenominator'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/AddressFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class AddressFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | return [ 21 | 'use' => fake()->randomElement(Address::USE['binding']['valueset']['code']), 22 | 'type' => fake()->randomElement(Address::TYPE['binding']['valueset']['code']), 23 | 'text' => fake()->address(), 24 | 'line' => [fake()->streetAddress()], 25 | 'postal_code' => fake()->postcode(), 26 | 'country' => 'ID', 27 | ]; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_090130_create_encounter_status_history_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter')->onDelete('cascade'); 19 | $table->string('status'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('encounter_status_history'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_15_090920_create_encounter_diagnosis_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('encounter_id'); 17 | $table->index('encounter_id'); 18 | $table->foreign('encounter_id')->references('id')->on('encounter')->onDelete('cascade'); 19 | $table->unsignedInteger('rank')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('encounter_diagnosis'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_17_062216_create_observation_ref_range_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('observation_id'); 17 | $table->index('observation_id'); 18 | $table->foreign('observation_id')->references('id')->on('observation')->onDelete('cascade'); 19 | $table->text('text')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('observation_ref_range'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_21_041531_create_med_req_disp_req_initial_fill_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('med_req_disp_req_id'); 17 | $table->index('med_req_disp_req_id'); 18 | $table->foreign('med_req_disp_req_id')->references('id')->on('med_req_dispense_request')->onDelete('cascade'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | */ 25 | public function down(): void 26 | { 27 | Schema::dropIfExists('med_req_disp_req_initial_fill'); 28 | } 29 | }; 30 | -------------------------------------------------------------------------------- /database/migrations/2023_10_20_154243_create_medication_ingredient_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('medication_id'); 17 | $table->index('medication_id'); 18 | $table->foreign('medication_id')->references('id')->on('medication')->onDelete('cascade'); 19 | $table->boolean('is_active')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('medication_ingredient'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_21_041531_create_med_req_substitution_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('med_req_id'); 17 | $table->index('med_req_id'); 18 | $table->foreign('med_req_id')->references('id')->on('medication_request')->onDelete('cascade'); 19 | $table->boolean('allowed_boolean')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('med_req_substitution'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_231419_create_periods_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->dateTime('start')->nullable(); 17 | $table->dateTime('end')->nullable(); 18 | $table->unsignedBigInteger('periodable_id'); 19 | $table->string('periodable_type'); 20 | $table->string('attr_type')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('periods'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/VerifyEmailController.php: -------------------------------------------------------------------------------- 1 | user()->hasVerifiedEmail()) { 19 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 20 | } 21 | 22 | if ($request->user()->markEmailAsVerified()) { 23 | event(new Verified($request->user())); 24 | } 25 | 26 | return redirect()->intended(RouteServiceProvider::HOME.'?verified=1'); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/ClinicalImpressionFactory.php: -------------------------------------------------------------------------------- 1 | 16 | */ 17 | public function definition(): array 18 | { 19 | return [ 20 | 'resource_id' => Resource::factory()->create(['res_type' => 'ClinicalImpression']), 21 | 'status' => fake()->randomElement(ClinicalImpression::STATUS['binding']['valueset']['code']), 22 | 'description' => fake()->sentence(), 23 | 'effective_date_time' => fake()->dateTime(), 24 | 'date' => fake()->dateTime(), 25 | 'summary' => fake()->sentence(), 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/factories/fhir/resources/ObservationFactory.php: -------------------------------------------------------------------------------- 1 | 17 | */ 18 | public function definition(): array 19 | { 20 | $status = fake()->randomElement(Observation::STATUS['binding']['valueset']['code']); 21 | 22 | return [ 23 | 'resource_id' => Resource::factory()->create(['res_type' => 'Observation']), 24 | 'status' => $status, 25 | 'issued' => fake()->dateTime(), 26 | 'effective_date_time' => fake()->dateTime(), 27 | 'value_string' => fake()->sentence(), 28 | ]; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_06_140236_create_patient_contact_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('patient_id'); 17 | $table->index('patient_id'); 18 | $table->foreign('patient_id')->references('id')->on('patient')->onDelete('cascade'); 19 | $table->enum('gender', ['male', 'female', 'other', 'unknown'])->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('patient_contact'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/DurationFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class DurationFactory extends Factory 13 | { 14 | /** 15 | * Define the model's default state. 16 | * 17 | * @return array 18 | */ 19 | public function definition(): array 20 | { 21 | $code = DB::table(Codesystems::UCUM['table'])->inRandomOrder()->first(); 22 | 23 | return [ 24 | 'value' => fake()->randomFloat(2, 0, 1000), 25 | 'comparator' => fake()->randomElement(['<', '<=', '>=', '>']), 26 | 'unit' => $code->unit, 27 | 'system' => Codesystems::UCUM['system'], 28 | 'code' => $code->code, 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/QuantityFactory.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class QuantityFactory extends Factory 13 | { 14 | /** 15 | * Define the model's default state. 16 | * 17 | * @return array 18 | */ 19 | public function definition(): array 20 | { 21 | $code = DB::table(Codesystems::UCUM['table'])->inRandomOrder()->first(); 22 | 23 | return [ 24 | 'value' => fake()->randomFloat(2, 0, 1000), 25 | 'comparator' => fake()->randomElement(['<', '<=', '>=', '>']), 26 | 'unit' => $code->unit, 27 | 'system' => Codesystems::UCUM['system'], 28 | 'code' => $code->code, 29 | ]; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /database/factories/fhir/datatypes/HumanNameFactory.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class HumanNameFactory extends Factory 12 | { 13 | /** 14 | * Define the model's default state. 15 | * 16 | * @return array 17 | */ 18 | public function definition(): array 19 | { 20 | $uses = Identifier::USE['binding']['valueset']['code']; 21 | $use = fake()->randomElement($uses); 22 | 23 | return [ 24 | 'use' => $use, 25 | 'text' => fake()->name(), 26 | 'family' => fake()->lastName(), 27 | 'given' => [fake()->firstName()], 28 | 'prefix' => [fake()->title()], 29 | 'suffix' => [fake()->suffix()] 30 | ]; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/cors.php: -------------------------------------------------------------------------------- 1 | ['api/*', 'sanctum/csrf-cookie'], 19 | 20 | 'allowed_methods' => ['*'], 21 | 22 | 'allowed_origins' => ['*'], 23 | 24 | 'allowed_origins_patterns' => [], 25 | 26 | 'allowed_headers' => ['*'], 27 | 28 | 'exposed_headers' => [], 29 | 30 | 'max_age' => 0, 31 | 32 | 'supports_credentials' => false, 33 | 34 | ]; 35 | -------------------------------------------------------------------------------- /database/migrations/2023_10_25_050537_create_clinical_impression_finding_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('impression_id'); 17 | $table->index('impression_id'); 18 | $table->foreign('impression_id')->references('id')->on('clinical_impression')->onDelete('cascade'); 19 | $table->string('basis')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('clinical_impression_finding'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_235723_create_complex_extensions_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->json('exts'); 17 | $table->string('url'); 18 | $table->unsignedBigInteger('complex_extendable_id'); 19 | $table->string('complex_extendable_type'); 20 | $table->string('attr_type')->nullable(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('complex_extensions'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /app/Http/Requests/Fhir/Search/KfaRequest.php: -------------------------------------------------------------------------------- 1 | |string> 13 | */ 14 | public function rules(): array 15 | { 16 | return [ 17 | 'page' => 'required|integer|min:1', 18 | 'size' => 'required|integer|min:1|max:100', 19 | 'product_type' => 'required|in:farmasi,alkes', 20 | 'from_date' => 'sometimes|date_format:Y-m-d', 21 | 'to_date' => 'sometimes|date_format:Y-m-d', 22 | 'farmalkes_type' => 'sometimes|string', 23 | 'keyword' => 'sometimes|string', 24 | 'template_code' => 'sometimes|string', 25 | 'packaging_code' => 'sometimes|string', 26 | ]; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('name'); 17 | $table->string('email')->unique(); 18 | $table->timestamp('email_verified_at')->nullable(); 19 | $table->string('password'); 20 | $table->timestamp('password_changed_at')->nullable(); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('users'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2023_10_21_041530_create_med_req_dispense_request_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('med_req_id'); 17 | $table->index('med_req_id'); 18 | $table->foreign('med_req_id')->references('id')->on('medication_request')->onDelete('cascade'); 19 | $table->unsignedInteger('number_of_repeats_allowed')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('med_req_dispense_request'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /database/migrations/2023_10_22_150622_create_composition_relates_to_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('composition_id'); 17 | $table->index('composition_id'); 18 | $table->foreign('composition_id')->references('id')->on('composition')->onDelete('cascade'); 19 | $table->enum('code', ['replaces', 'transforms', 'signs', 'append']); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | */ 26 | public function down(): void 27 | { 28 | Schema::dropIfExists('composition_relates_to'); 29 | } 30 | }; 31 | -------------------------------------------------------------------------------- /app/Models/Fhir/BackboneElements/LocationHoursOfOperation.php: -------------------------------------------------------------------------------- 1 | 'array', 19 | 'all_day' => 'boolean', 20 | 'opening_time' => 'datetime', 21 | 'closing_time' => 'datetime', 22 | ]; 23 | 24 | public $timestamps = false; 25 | 26 | public function location(): BelongsTo 27 | { 28 | return $this->belongsTo(Location::class); 29 | } 30 | 31 | public const DAYS_OF_WEEK = [ 32 | 'binding' => [ 33 | 'valueset' => Valuesets::DaysOfWeek 34 | ] 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /tests/Unit/ResourceTest.php: -------------------------------------------------------------------------------- 1 | create(); 14 | $user->assignRole('admin'); 15 | 16 | $count = fake()->randomDigitNotZero(); 17 | Patient::factory()->count($count)->create(); 18 | 19 | $response = $this->actingAs($user)->get(route('local.resource.index', ['res_type' => 'patient'])); 20 | $response->assertStatus(200); 21 | $response->assertJsonStructure([ 22 | '*' => [ 23 | 'id', 24 | 'satusehat_id', 25 | 'res_type', 26 | 'res_version', 27 | 'fhir_ver', 28 | 'created_at', 29 | 'updated_at' 30 | ] 31 | ]); 32 | $response->assertJsonCount($count); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /database/migrations/2023_09_10_161041_create_resource_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('satusehat_id')->unique()->nullable(); 17 | $table->index('satusehat_id'); 18 | $table->string('res_type'); 19 | $table->index('res_type'); 20 | $table->integer('res_version')->default(1); 21 | $table->string('fhir_ver')->default('R4'); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('resource'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2023_10_20_154244_create_medication_batch_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('medication_id'); 17 | $table->index('medication_id'); 18 | $table->foreign('medication_id')->references('id')->on('medication')->onDelete('cascade'); 19 | $table->string('lot_number')->nullable(); 20 | $table->dateTime('expiration_date')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('medication_batch'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/factories/UserFactory.php: -------------------------------------------------------------------------------- 1 | 14 | */ 15 | public function definition(): array 16 | { 17 | return [ 18 | 'name' => fake()->name(), 19 | 'email' => fake()->unique()->safeEmail(), 20 | 'email_verified_at' => now(), 21 | 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 22 | 'remember_token' => Str::random(10), 23 | ]; 24 | } 25 | 26 | /** 27 | * Indicate that the model's email address should be unverified. 28 | */ 29 | public function unverified(): static 30 | { 31 | return $this->state(fn (array $attributes) => [ 32 | 'email_verified_at' => null, 33 | ]); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /database/migrations/2023_09_10_161942_create_resource_content_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('resource_id'); 17 | $table->index('resource_id'); 18 | $table->foreign('resource_id')->references('id')->on('resource')->onDelete('cascade'); 19 | $table->integer('res_ver')->default(1); 20 | $table->json('res_text'); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('resource_content'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2023_10_09_121210_create_organization_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('resource_id'); 17 | $table->index('resource_id'); 18 | $table->foreign('resource_id')->references('id')->on('resource')->onDelete('cascade'); 19 | $table->boolean('active')->nullable(); 20 | $table->string('name')->nullable(); 21 | $table->json('alias')->nullable(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('organization'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_214539_create_identifiers_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('use')->nullable(); 17 | $table->string('system')->nullable(); 18 | $table->string('value')->nullable(); 19 | $table->unsignedBigInteger('identifiable_id'); 20 | $table->string('identifiable_type'); 21 | $table->string('attr_type')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('identifiers'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /app/Models/Fhir/BackboneElements/EncounterStatusHistory.php: -------------------------------------------------------------------------------- 1 | belongsTo(Encounter::class); 24 | } 25 | 26 | public function period(): MorphOne 27 | { 28 | return $this->morphOne(Period::class, 'periodable'); 29 | } 30 | 31 | public const STATUS = [ 32 | 'binding' => [ 33 | 'valueset' => Valuesets::EncounterStatus 34 | ] 35 | ]; 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2023_10_11_163117_create_location_position_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('location_id'); 17 | $table->index('location_id'); 18 | $table->foreign('location_id')->references('id')->on('location')->onDelete('cascade'); 19 | $table->double('longitude'); 20 | $table->double('latitude'); 21 | $table->double('altitude')->nullable(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | */ 28 | public function down(): void 29 | { 30 | Schema::dropIfExists('location_position'); 31 | } 32 | }; 33 | -------------------------------------------------------------------------------- /database/migrations/2023_12_21_231721_create_references_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('reference')->nullable(); 17 | $table->string('type')->nullable(); 18 | $table->string('display')->nullable(); 19 | $table->unsignedBigInteger('referenceable_id'); 20 | $table->string('referenceable_type'); 21 | $table->string('attr_type')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('references'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2023_12_23_121519_create_annotations_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->string('author_string')->nullable(); 17 | $table->dateTime('time')->nullable(); 18 | $table->text('text'); // markdown format 19 | $table->unsignedBigInteger('annotable_id'); 20 | $table->string('annotable_type'); 21 | $table->string('attr_type')->nullable(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | */ 29 | public function down(): void 30 | { 31 | Schema::dropIfExists('annotations'); 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /database/migrations/2023_10_09_120151_create_practitioner_user_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('user_id'); 17 | $table->index('user_id'); 18 | $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); 19 | $table->unsignedBigInteger('practitioner_id'); 20 | $table->foreign('practitioner_id')->references('id')->on('practitioner')->onDelete('cascade'); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('practitioner_user'); 30 | } 31 | }; 32 | -------------------------------------------------------------------------------- /database/migrations/2023_10_22_150348_create_composition_attester_table.php: -------------------------------------------------------------------------------- 1 | id(); 16 | $table->unsignedBigInteger('composition_id'); 17 | $table->index('composition_id'); 18 | $table->foreign('composition_id')->references('id')->on('composition')->onDelete('cascade'); 19 | $table->enum('mode', ['personal', 'professional', 'legal', 'official']); 20 | $table->dateTime('time')->nullable(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | */ 27 | public function down(): void 28 | { 29 | Schema::dropIfExists('composition_attester'); 30 | } 31 | }; 32 | --------------------------------------------------------------------------------