feature: Backend as Single Source of Truth for Batch-Type Field Requirements
This commit is contained in:
@@ -220,10 +220,10 @@ const allergyFields = ref<FieldInfo[]>([])
|
||||
const medicationFields = ref<FieldInfo[]>([])
|
||||
const encounterFields = ref<FieldInfo[]>([])
|
||||
|
||||
const batchType = computed(() => props.batch?.batchType ?? '')
|
||||
const showAllergies = computed(() => ['ALLERGY_UPDATE', 'MIXED'].includes(batchType.value))
|
||||
const showMedications = computed(() => ['MEDICATION_LIST', 'MIXED'].includes(batchType.value))
|
||||
const showEncounterSummary = computed(() => ['ENCOUNTER_SUMMARY', 'MIXED'].includes(batchType.value))
|
||||
const fieldReqs = computed(() => batchStore.currentDraft?.fieldRequirements)
|
||||
const showAllergies = computed(() => fieldReqs.value?.showAllergies ?? false)
|
||||
const showMedications = computed(() => fieldReqs.value?.showMedications ?? false)
|
||||
const showEncounterSummary = computed(() => fieldReqs.value?.showEncounterSummaryFields ?? false)
|
||||
|
||||
function parseJsonList(json: string | null): string[] {
|
||||
if (!json) return []
|
||||
|
||||
Reference in New Issue
Block a user