<script setup lang="ts">
import Block from '~/components/pub/my-ui/doc-entry/block.vue'
import Cell from '~/components/pub/my-ui/doc-entry/cell.vue'
import Field from '~/components/pub/my-ui/doc-entry/field.vue'
import Label from '~/components/pub/my-ui/doc-entry/label.vue'

const props = defineProps<{
  excludeFields?: string[]
}>()

const emits = defineEmits(['click'])

const subject = ref({
  'prim-compl': '',
  'sec-compl': '',
  'cur-disea-hist': '',
  'pas-disea-hist': '',
  'fam-disea-hist': '',
  'alg-hist': '',
  'alg-react': '',
  'med-hist': '',
  'blood-type': '',
})

const isExcluded = (key: string) => props.excludeFields?.includes(key)
</script>

<template>
  <form id="entry-form">
    <div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
      <div>
        <h1 class="font-semibold">Pemeriksaan Fisiatrik</h1>
        <span class="text-sm font-semibold">Anamnesa</span>
      </div>
      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block>
          <Cell>
            <Label dynamic>Keluhan Utama</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
        </Block>

        <Block :colCount="3">
          <Cell>
            <Label dynamic>Diagnosa Medis</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Rencana Awal Medis</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Terapi</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
        </Block>
      </div>
      <Separator class="mt-8" />

      <div class="my-2">
        <h1 class="font-semibold">Pemeriksaan Fisik</h1>
        <span class="text-sm font-semibold">Status Generalis</span>
      </div>

      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block :colCount="3">
          <Cell>
            <Label dynamic>Tekanan Darah</Label>
            <Field>
              <Input placeholder="Sistolik" />
              <Input placeholder="Diastolik" />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Nadi</Label>
            <Field>
              <Input />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>GCS</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
        <Block :colCount="3">
          <Cell>
            <Label dynamic>RR</Label>
            <Field>
              <Input />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Ambulasi</Label>
            <Field>
              <RadioGroup class="flex gap-4">
                <div class="flex items-center space-x-2">
                  <RadioGroupItem
                    id="vaksin-yes"
                    value="yes"
                  />
                  <Label for="vaksin-yes">Dependent</Label>
                </div>
                <div class="flex items-center space-x-2">
                  <RadioGroupItem
                    id="vaksin-no"
                    value="no"
                  />
                  <Label for="vaksin-no">Independen</Label>
                </div>
              </RadioGroup>
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Gait</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
        </Block>
      </div>

      <div class="my-2">
        <span class="text-sm font-semibold">Status Neurologis</span>
      </div>

      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block :colCount="3">
          <Cell>
            <Label dynamic>N. Cranialis</Label>
            <Field>
              <Input />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Sensoris</Label>
            <Field>
              <Input />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Reflek Fisilogis</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
        <Block :colCount="2">
          <Cell>
            <Label dynamic>Reflek Patologis</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>Saraf Otonom</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
      </div>

      <div class="my-2">
        <span class="text-sm font-semibold">Status Muskuloskeletal - ROM</span>
      </div>

      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block :colCount="2">
          <Cell>
            <Label dynamic>Leher</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>Batang Tubuh</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
        <Block :colCount="2">
          <Cell>
            <Label dynamic>AGA</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>AGB</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
      </div>

      <div class="my-2">
        <span class="text-sm font-semibold">Status Muskuloskeletal - MMT</span>
      </div>

      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block :colCount="2">
          <Cell>
            <Label dynamic>Leher</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>Batang Tubuh</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
        <Block :colCount="2">
          <Cell>
            <Label dynamic>AGA</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>AGB</Label>
            <Field>
              <Input />
            </Field>
          </Cell>
        </Block>
      </div>

      <div class="my-2">
        <span class="text-sm font-semibold">Statu Lokalis</span>
      </div>

      <Block>
        <Cell>
          <Label dynamic>Deskripsi Temuan Fisik</Label>
          <Field>
            <Textarea />
          </Field>
        </Cell>
      </Block>

      <Separator class="mt-8" />

      <div class="my-2">
        <h1 class="font-semibold">Pemeriksaan Penunjang</h1>
      </div>

      <Block>
        <Cell>
          <Label dynamic>Catatan Pemeriksaan Penunjang</Label>
          <Field>
            <Textarea />
          </Field>
        </Cell>
      </Block>

      <Separator class="mt-8" />

      <div class="my-2">
        <h1 class="font-semibold">Daftar Masalah</h1>
      </div>

      <Block :colCount="2">
        <Cell>
          <Label dynamic>Masalah Medik</Label>
          <Field>
            <Textarea />
          </Field>
        </Cell>
        <Cell>
          <Label dynamic>Masalah Rehabilitasi Medik</Label>
          <Field>
            <Textarea />
          </Field>
        </Cell>
      </Block>

      <Separator class="mt-8" />

      <div class="my-2">
        <h1 class="font-semibold">Diagnosa Fungsional (ICD-X)</h1>
      </div>

      <div class="mb-8 grid grid-cols-2 gap-4">
        <AppIcdPreview />
      </div>

      <div class="my-2">
        <h1 class="font-semibold">Program Rehabilitasi</h1>
      </div>

      <div class="my-2 rounded-md border border-slate-300 p-4">
        <Block :colCount="3">
          <Cell>
            <Label dynamic>Modalitas Fisik</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Latihan</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>

          <Cell>
            <Label dynamic>Ortesa Protesa</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
        </Block>
        <Block :colCount="2">
          <Cell>
            <Label dynamic>Edukasi</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
          <Cell>
            <Label dynamic>Lain-Lain</Label>
            <Field>
              <Textarea />
            </Field>
          </Cell>
        </Block>
      </div>
    </div>
  </form>
</template>
