wip: init form entry education assessment
import clinical const from sheets wip: form entry add education assessment done: checkbox wip: add select Asesmen Kemampuan dan Kemauan Belajar
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
export const generalEduCode = {
|
||||
'right-obg': 'Hak dan kewajiban pasien dan keluarga',
|
||||
'general-consent': 'General Consent',
|
||||
service: 'Pelayanan yang disediakan (jam pelayanan, akses pelayanan dan proses pelayanan)',
|
||||
'all-care-service': 'Sumber alternatif asuhan di tempat lain/faskes lain',
|
||||
'home-plan': 'Rencana tindakan di rumah',
|
||||
'home-care': 'Kebutuhan perawatan di rumah',
|
||||
orientation: 'Orientasi Ruangan',
|
||||
'fall-risk-prevention': 'Pencegahan risiko jatuh',
|
||||
'alt-care': 'Alternatif pelayanan',
|
||||
'act-delay': 'Penundaan Tindakan',
|
||||
others: 'Lain-lain',
|
||||
} as const
|
||||
|
||||
export type GeneralEduCodeKey = keyof typeof generalEduCode
|
||||
|
||||
export const specialEduCode = {
|
||||
'disease-diag-dev': 'Diagnosa penyakit dan perkembangannya',
|
||||
'safe-med-usage': 'Penggunaan obat yang aman',
|
||||
'side-effect': 'Efek samping dan reaksi obat',
|
||||
diet: 'Diet/Nutrisi',
|
||||
'pain-mgmt': 'Manajemen nyeri',
|
||||
'medical-eq-usage': 'Penggunaan Peralatan Medis',
|
||||
'rehab-technique': 'Teknik Rehabilitasi',
|
||||
'prevention-act': 'Tindakan pencegahan (cuci tangan, pemasangan gelang)',
|
||||
} as const
|
||||
|
||||
export type SpecialEduCodeKey = keyof typeof specialEduCode
|
||||
|
||||
export const eduAssessmentCode = {
|
||||
'learn-ability': 'Kemampuan Belajar',
|
||||
'learn-will': 'Kemauan Belajar',
|
||||
obstacle: 'Hambatan',
|
||||
'learn-method': 'Metode Pembelajaran',
|
||||
lang: 'Bahasa',
|
||||
'lang-obstacle': 'Hambatan Bahasa',
|
||||
belief: 'Keyakinan',
|
||||
} as const
|
||||
|
||||
export type EduAssessmentCodeKey = keyof typeof eduAssessmentCode
|
||||
|
||||
export const abilityCode = {
|
||||
able: 'Mampu',
|
||||
'not-able': 'Tidak Mampu',
|
||||
} as const
|
||||
|
||||
export type AbilityCodeKey = keyof typeof abilityCode
|
||||
|
||||
export const willCode = {
|
||||
ready: 'Siap',
|
||||
interested: 'Tertarik',
|
||||
'not-interested': 'Tidak Tertarik',
|
||||
} as const
|
||||
|
||||
export type WillCodeKey = keyof typeof willCode
|
||||
|
||||
export const medObstacleCode = {
|
||||
hearing: 'Pendengaran',
|
||||
sight: 'Penglihatan',
|
||||
physical: 'Fisik',
|
||||
emotional: 'Emosional',
|
||||
cognitif: 'Kognitif',
|
||||
} as const
|
||||
|
||||
export type MedObstacleCodeKey = keyof typeof medObstacleCode
|
||||
|
||||
export const learnMethodCode = {
|
||||
demo: 'Demonstrasi',
|
||||
'discuss-leaflet': 'Diskusi Leaflet',
|
||||
} as const
|
||||
|
||||
export type LearnMethodCodeKey = keyof typeof learnMethodCode
|
||||
|
||||
export const langClassCode = {
|
||||
ind: 'Indonesia',
|
||||
region: 'Daerah',
|
||||
foreign: 'Asing',
|
||||
} as const
|
||||
|
||||
export type LangClassCodeKey = keyof typeof langClassCode
|
||||
|
||||
export const translatorSrcCode = {
|
||||
team: 'Tim Penerjemah',
|
||||
family: 'Keluarga',
|
||||
} as const
|
||||
|
||||
export type TranslatorSrcCodeKey = keyof typeof translatorSrcCode
|
||||
+13
-1
@@ -7,6 +7,10 @@ export interface SelectOptionType<_T = string> {
|
||||
label: string
|
||||
code?: string
|
||||
}
|
||||
export interface CheckItem {
|
||||
id: string
|
||||
label: string
|
||||
}
|
||||
|
||||
export function cn(...inputs: ClassValue[]) {
|
||||
return twMerge(clsx(inputs))
|
||||
@@ -27,6 +31,15 @@ export function mapToComboboxOptList(items: Record<string, string>): SelectOptio
|
||||
return result
|
||||
}
|
||||
|
||||
export function mapToCheckItems<T extends Record<string, string>, K extends keyof T & string>(
|
||||
items: T,
|
||||
): { id: K; label: T[K] }[] {
|
||||
return Object.entries(items).map(([key, value]) => ({
|
||||
id: key as K,
|
||||
label: value as T[K],
|
||||
}))
|
||||
}
|
||||
|
||||
/**
|
||||
* Mengkonversi string menjadi title case (huruf pertama setiap kata kapital)
|
||||
* @param str - String yang akan dikonversi
|
||||
@@ -36,7 +49,6 @@ export function toTitleCase(str: string): string {
|
||||
return str.toLowerCase().replace(/\b\w/g, (char) => char.toUpperCase())
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Menghitung umur berdasarkan tanggal lahir
|
||||
* @param birthDate - Tanggal lahir dalam format Date atau string
|
||||
|
||||
Reference in New Issue
Block a user