{
  "$schema": "https://uipkge.dev/schema/registry-item.json",
  "name": "patient-intake-form",
  "title": "Patient Intake Form",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-angular/blocks/patient-intake-form/patient-intake-form.component.ts",
      "content": "// HIPAA-compliant new patient registration in a SectionCard: a 4-step Stepper (Personal\n// Information → Medical History → Insurance & Billing → Consent & Sign) with demographic\n// inputs, chronic-conditions checklist, allergy/medication textareas, carrier selection with\n// card-photo dropzones, HIPAA disclosures with an electronic signature stamp, and a\n// post-submission confirmation receipt. Port of the React block 1:1.\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, computed, signal } from '@angular/core'\nimport {\n  Activity,\n  AlertTriangle,\n  Building2,\n  Calendar,\n  Check,\n  ChevronLeft,\n  ChevronRight,\n  CreditCard,\n  Download,\n  FileCheck,\n  FileText,\n  Lock,\n  LucideAngularModule,\n  Phone,\n  RotateCcw,\n  ShieldCheck,\n  Stethoscope,\n  User,\n  UserCheck,\n} from 'lucide-angular'\nimport { cn } from '@/lib/utils'\nimport { UiBadgeComponent } from '@/ui/badge/badge.component'\nimport { UiButtonComponent } from '@/ui/button/button.component'\nimport { UiCheckboxComponent } from '@/ui/checkbox/checkbox.component'\nimport { UiInputComponent } from '@/ui/input/input.component'\nimport { UiLabelComponent } from '@/ui/label/label.component'\nimport { UiSectionCardComponent } from '@/ui/section-card/section-card.component'\nimport {\n  UiSelectComponent,\n  UiSelectContentComponent,\n  UiSelectItemComponent,\n  UiSelectTriggerComponent,\n  UiSelectValueComponent,\n} from '@/ui/select/select.component'\nimport { UiSeparatorComponent } from '@/ui/separator/separator.component'\nimport { UiStepperComponent, type StepperStep } from '@/ui/stepper/stepper.component'\nimport { UiTextareaComponent } from '@/ui/textarea/textarea.component'\n\nexport interface PatientIntakeData {\n  firstName: string\n  middleName: string\n  lastName: string\n  preferredName: string\n  dob: string\n  biologicalSex: string\n  maritalStatus: string\n  phone: string\n  email: string\n  streetAddress: string\n  city: string\n  state: string\n  zipCode: string\n  emergencyName: string\n  emergencyRelationship: string\n  emergencyPhone: string\n  chronicConditions: string[]\n  hasAllergies: boolean\n  allergyDetails: string\n  currentMedications: string\n  pastSurgeries: string\n  primaryCarePhysician: string\n  clinicPhone: string\n  insuranceCarrier: string\n  memberId: string\n  groupNumber: string\n  policyholderName: string\n  policyholderRelationship: string\n  frontCardUploaded: boolean\n  backCardUploaded: boolean\n  hipaaConsent: boolean\n  treatmentConsent: boolean\n  telehealthConsent: boolean\n  signatureName: string\n  signatureDate: string\n  signerRole: string\n}\n\nconst steps: StepperStep[] = [\n  { id: 1, title: 'Personal Information', description: 'Demographics & Contact' },\n  { id: 2, title: 'Medical History', description: 'Conditions & Medications' },\n  { id: 3, title: 'Insurance & Billing', description: 'Coverage & Card Photos' },\n  { id: 4, title: 'Consent & Sign', description: 'HIPAA & Authorization' },\n]\n\nconst CHRONIC_CONDITIONS = [\n  { id: 'hypertension', label: 'Hypertension (High Blood Pressure)' },\n  { id: 'diabetes', label: 'Diabetes (Type 1 or Type 2)' },\n  { id: 'asthma', label: 'Asthma / Respiratory Conditions' },\n  { id: 'heart_disease', label: 'Coronary Artery / Heart Disease' },\n  { id: 'arthritis', label: 'Arthritis / Chronic Joint Pain' },\n  { id: 'cancer', label: 'Cancer / Remission History' },\n  { id: 'thyroid', label: 'Thyroid / Endocrine Disorder' },\n  { id: 'anxiety_depression', label: 'Depression / Clinical Anxiety' },\n  { id: 'kidney_disease', label: 'Chronic Kidney Disease' },\n  { id: 'gerd', label: 'Acid Reflux / GERD' },\n]\n\nconst INSURANCE_CARRIERS = [\n  { id: 'bcbs', label: 'BlueCross BlueShield' },\n  { id: 'aetna', label: 'Aetna Health' },\n  { id: 'cigna', label: 'Cigna Healthcare' },\n  { id: 'united', label: 'UnitedHealthcare' },\n  { id: 'medicare', label: 'Medicare Part A / B' },\n  { id: 'medicaid', label: 'Medicaid' },\n  { id: 'humana', label: 'Humana' },\n  { id: 'kaiser', label: 'Kaiser Permanente' },\n  { id: 'self_pay', label: 'Self-Pay (Uninsured)' },\n]\n\nconst DEFAULT_FORM: PatientIntakeData = {\n  firstName: 'Eleanor',\n  middleName: 'Rose',\n  lastName: 'Vance',\n  preferredName: 'Ellie',\n  dob: '1988-10-14',\n  biologicalSex: 'female',\n  maritalStatus: 'married',\n  phone: '(555) 234-8921',\n  email: 'eleanor.vance@example.com',\n  streetAddress: '742 Evergreen Terrace',\n  city: 'Springfield',\n  state: 'OR',\n  zipCode: '97477',\n  emergencyName: 'Marcus Vance',\n  emergencyRelationship: 'spouse',\n  emergencyPhone: '(555) 987-6543',\n  chronicConditions: ['hypertension', 'asthma'],\n  hasAllergies: true,\n  allergyDetails: 'Penicillin (Anaphylaxis/hives), Sulfa antibiotics (severe skin rash)',\n  currentMedications:\n    'Lisinopril 10mg PO once daily in morning, Albuterol HFA 90mcg inhaler 1-2 puffs Q4H PRN for bronchospasm, Multivitamin daily',\n  pastSurgeries: 'Appendectomy (Laparoscopic, 2016), Right knee arthroscopy / meniscus debridement (2021)',\n  primaryCarePhysician: 'Dr. Robert Chen, MD',\n  clinicPhone: '(555) 601-2290 — Northwest Health Partners',\n  insuranceCarrier: 'bcbs',\n  memberId: 'XEH-902814891',\n  groupNumber: 'GRP-44028',\n  policyholderName: 'Eleanor Vance',\n  policyholderRelationship: 'self',\n  frontCardUploaded: true,\n  backCardUploaded: true,\n  hipaaConsent: true,\n  treatmentConsent: true,\n  telehealthConsent: true,\n  signatureName: 'Eleanor R. Vance',\n  signatureDate: '2026-08-21',\n  signerRole: 'patient',\n}\n\n@Component({\n  changeDetection: ChangeDetectionStrategy.Eager,\n  selector: 'ui-patient-intake-form, [ui-patient-intake-form]',\n  standalone: true,\n  // React renders the SectionCard itself: the host stays out of layout and `class` goes to the card.\n  host: { '[attr.class]': '\"contents\"' },\n  imports: [\n    LucideAngularModule,\n    UiBadgeComponent,\n    UiButtonComponent,\n    UiCheckboxComponent,\n    UiInputComponent,\n    UiLabelComponent,\n    UiSectionCardComponent,\n    UiSelectComponent,\n    UiSelectContentComponent,\n    UiSelectItemComponent,\n    UiSelectTriggerComponent,\n    UiSelectValueComponent,\n    UiSeparatorComponent,\n    UiStepperComponent,\n    UiTextareaComponent,\n  ],\n  template: `\n    <ui-section-card\n      data-slot=\"patient-intake-form\"\n      title=\"New Patient Registration\"\n      description=\"HIPAA-compliant digital intake questionnaire & clinical onboarding portal.\"\n      [class]=\"cardClass\"\n    >\n      <div slot=\"header-action\" class=\"flex items-center gap-2\">\n        <span\n          ui-badge\n          wrap\n          variant=\"outline\"\n          class=\"border-success/30 bg-success/10 text-success gap-1 py-0.5 text-xs font-medium\"\n        >\n          <lucide-icon [img]=\"ShieldCheck\" class=\"size-3.5\" />\n          HIPAA Protected\n        </span>\n        <span ui-badge wrap variant=\"secondary\" class=\"hidden font-mono text-xs sm:inline-flex\">\n          Form #PHI-2026-894\n        </span>\n      </div>\n\n      @if (step() <= 4) {\n        <ui-stepper [steps]=\"steps\" [value]=\"step()\" (valueChange)=\"onStepperInput($event)\" class=\"mb-6\" />\n      }\n\n      <!-- STEP 1: Personal Information -->\n      @if (step() === 1) {\n        <div class=\"space-y-6\">\n          <div class=\"border-border/80 bg-muted/40 flex items-start gap-3 rounded-lg border p-3.5 text-xs\">\n            <lucide-icon [img]=\"ShieldCheck\" class=\"text-primary mt-0.5 size-4 shrink-0\" />\n            <div class=\"space-y-0.5\">\n              <p class=\"text-foreground font-semibold\">Protected Health Information (PHI) Notice</p>\n              <p class=\"text-muted-foreground leading-relaxed\">\n                All legal demographics and medical history submitted through this portal are encrypted in accordance\n                with federal HIPAA Omnibus rules and directly synchronized with the clinic's Electronic Health Record\n                (EHR).\n              </p>\n            </div>\n          </div>\n\n          <div class=\"space-y-3\">\n            <h3 class=\"text-foreground flex items-center gap-2 text-xs font-semibold\">\n              <lucide-icon [img]=\"User\" class=\"text-primary size-3.5\" />\n              Legal Patient Identification\n            </h3>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-4\">\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"pi-first-name\" class=\"text-xs\">Legal First Name *</label>\n                <ui-input\n                  id=\"pi-first-name\"\n                  [value]=\"form().firstName\"\n                  (valueChange)=\"setField('firstName', $event)\"\n                  placeholder=\"First name\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"pi-middle-name\" class=\"text-xs\">Middle Name</label>\n                <ui-input\n                  id=\"pi-middle-name\"\n                  [value]=\"form().middleName\"\n                  (valueChange)=\"setField('middleName', $event)\"\n                  placeholder=\"Middle name\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"pi-last-name\" class=\"text-xs\">Legal Last Name *</label>\n                <ui-input\n                  id=\"pi-last-name\"\n                  [value]=\"form().lastName\"\n                  (valueChange)=\"setField('lastName', $event)\"\n                  placeholder=\"Last name\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"pi-preferred-name\" class=\"text-xs\">Preferred Name</label>\n                <ui-input\n                  id=\"pi-preferred-name\"\n                  [value]=\"form().preferredName\"\n                  (valueChange)=\"setField('preferredName', $event)\"\n                  placeholder=\"Nickname / Preferred\"\n                  size=\"small\"\n                />\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-3\">\n            <h3 class=\"text-foreground flex items-center gap-2 text-xs font-semibold\">\n              <lucide-icon [img]=\"Calendar\" class=\"text-primary size-3.5\" />\n              Birth & Clinical Demographics\n            </h3>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-3\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-dob\" class=\"text-xs\">Date of Birth *</label>\n                <ui-input\n                  id=\"pi-dob\"\n                  [value]=\"form().dob\"\n                  (valueChange)=\"setField('dob', $event)\"\n                  type=\"date\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-biological-sex\" class=\"text-xs\">Biological Sex Assigned at Birth *</label>\n                <ui-select [value]=\"form().biologicalSex\" (valueChange)=\"setField('biologicalSex', $event)\">\n                  <button ui-select-trigger id=\"pi-biological-sex\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Select sex\" />\n                  </button>\n                  <ui-select-content>\n                    <ui-select-item value=\"female\">Female</ui-select-item>\n                    <ui-select-item value=\"male\">Male</ui-select-item>\n                    <ui-select-item value=\"intersex\">Intersex</ui-select-item>\n                    <ui-select-item value=\"undisclosed\">Prefer not to disclose</ui-select-item>\n                  </ui-select-content>\n                </ui-select>\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-marital-status\" class=\"text-xs\">Marital Status</label>\n                <ui-select [value]=\"form().maritalStatus\" (valueChange)=\"setField('maritalStatus', $event)\">\n                  <button ui-select-trigger id=\"pi-marital-status\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Select status\" />\n                  </button>\n                  <ui-select-content>\n                    <ui-select-item value=\"single\">Single</ui-select-item>\n                    <ui-select-item value=\"married\">Married</ui-select-item>\n                    <ui-select-item value=\"divorced\">Divorced</ui-select-item>\n                    <ui-select-item value=\"widowed\">Widowed</ui-select-item>\n                    <ui-select-item value=\"other\">Other</ui-select-item>\n                  </ui-select-content>\n                </ui-select>\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-3\">\n            <h3 class=\"text-foreground flex items-center gap-2 text-xs font-semibold\">\n              <lucide-icon [img]=\"Phone\" class=\"text-primary size-3.5\" />\n              Contact & Residential Address\n            </h3>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-phone\" class=\"text-xs\">Mobile Phone Number *</label>\n                <ui-input\n                  id=\"pi-phone\"\n                  [value]=\"form().phone\"\n                  (valueChange)=\"setField('phone', $event)\"\n                  type=\"tel\"\n                  placeholder=\"(555) 234-8921\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-email\" class=\"text-xs\">Email Address *</label>\n                <ui-input\n                  id=\"pi-email\"\n                  [value]=\"form().email\"\n                  (valueChange)=\"setField('email', $event)\"\n                  type=\"email\"\n                  placeholder=\"patient@example.com\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-2\">\n                <label ui-label for=\"pi-address\" class=\"text-xs\">Street Address *</label>\n                <ui-input\n                  id=\"pi-address\"\n                  [value]=\"form().streetAddress\"\n                  (valueChange)=\"setField('streetAddress', $event)\"\n                  placeholder=\"Street, Apt / Suite\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"grid grid-cols-1 gap-3 sm:col-span-2 sm:grid-cols-3\">\n                <div class=\"col-span-1 space-y-1.5\">\n                  <label ui-label for=\"pi-city\" class=\"text-xs\">City</label>\n                  <ui-input\n                    id=\"pi-city\"\n                    [value]=\"form().city\"\n                    (valueChange)=\"setField('city', $event)\"\n                    placeholder=\"City\"\n                    size=\"small\"\n                  />\n                </div>\n                <div class=\"col-span-1 space-y-1.5\">\n                  <label ui-label for=\"pi-state\" class=\"text-xs\">State</label>\n                  <ui-input\n                    id=\"pi-state\"\n                    [value]=\"form().state\"\n                    (valueChange)=\"setField('state', $event)\"\n                    placeholder=\"State / Province\"\n                    size=\"small\"\n                  />\n                </div>\n                <div class=\"col-span-1 space-y-1.5\">\n                  <label ui-label for=\"pi-zip\" class=\"text-xs\">ZIP Code</label>\n                  <ui-input\n                    id=\"pi-zip\"\n                    [value]=\"form().zipCode\"\n                    (valueChange)=\"setField('zipCode', $event)\"\n                    placeholder=\"ZIP code\"\n                    size=\"small\"\n                  />\n                </div>\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"border-border bg-muted/20 space-y-3 rounded-lg border p-4\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"UserCheck\" class=\"text-primary size-4\" />\n                <h4 class=\"text-foreground text-xs font-semibold\">\n                  Emergency Contact (Designated Healthcare Surrogate)\n                </h4>\n              </div>\n              <span ui-badge wrap variant=\"secondary\" class=\"text-xs\">Required</span>\n            </div>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-3\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-emg-name\" class=\"text-xs\">Contact Full Name *</label>\n                <ui-input\n                  id=\"pi-emg-name\"\n                  [value]=\"form().emergencyName\"\n                  (valueChange)=\"setField('emergencyName', $event)\"\n                  placeholder=\"Full legal name\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-emg-rel\" class=\"text-xs\">Relationship to Patient *</label>\n                <ui-select\n                  [value]=\"form().emergencyRelationship\"\n                  (valueChange)=\"setField('emergencyRelationship', $event)\"\n                >\n                  <button ui-select-trigger id=\"pi-emg-rel\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Relationship\" />\n                  </button>\n                  <ui-select-content>\n                    <ui-select-item value=\"spouse\">Spouse</ui-select-item>\n                    <ui-select-item value=\"parent\">Parent / Guardian</ui-select-item>\n                    <ui-select-item value=\"child\">Adult Child</ui-select-item>\n                    <ui-select-item value=\"sibling\">Sibling</ui-select-item>\n                    <ui-select-item value=\"friend\">Friend / Relative</ui-select-item>\n                    <ui-select-item value=\"other\">Other Legal Representative</ui-select-item>\n                  </ui-select-content>\n                </ui-select>\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"pi-emg-phone\" class=\"text-xs\">Emergency Phone *</label>\n                <ui-input\n                  id=\"pi-emg-phone\"\n                  [value]=\"form().emergencyPhone\"\n                  (valueChange)=\"setField('emergencyPhone', $event)\"\n                  type=\"tel\"\n                  placeholder=\"(555) 987-6543\"\n                  size=\"small\"\n                />\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n\n      <!-- STEP 2: Medical History -->\n      @if (step() === 2) {\n        <div class=\"space-y-6\">\n          <div class=\"space-y-3\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"Activity\" class=\"text-primary size-4\" />\n                <h3 class=\"text-foreground text-xs font-semibold\">Chronic & Pre-Existing Health Conditions</h3>\n              </div>\n              <span ui-badge wrap variant=\"secondary\" class=\"font-mono text-xs tabular-nums\">\n                {{ form().chronicConditions.length }} selected\n              </span>\n            </div>\n            <p class=\"text-muted-foreground text-xs\">\n              Select any conditions diagnosed or treated in the past 5 years. If none apply, leave unchecked.\n            </p>\n            <div class=\"grid grid-cols-1 gap-2.5 sm:grid-cols-2\">\n              @for (cond of chronicConditions; track cond.id) {\n                <div\n                  class=\"border-border hover:bg-muted/30 flex items-center gap-2.5 rounded-lg border p-2.5 transition-colors\"\n                >\n                  <ui-checkbox\n                    [id]=\"'condition-' + cond.id\"\n                    [checked]=\"form().chronicConditions.includes(cond.id)\"\n                    (checkedChange)=\"toggleCondition(cond.id, $event)\"\n                  />\n                  <label\n                    ui-label\n                    [for]=\"'condition-' + cond.id\"\n                    class=\"flex-1 cursor-pointer text-xs font-normal select-none\"\n                  >\n                    {{ cond.label }}\n                  </label>\n                </div>\n              }\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"border-border bg-muted/20 space-y-3 rounded-lg border p-4\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"AlertTriangle\" class=\"text-warning size-4\" />\n                <h4 class=\"text-foreground text-xs font-semibold\">Known Drug, Latex, or Food Allergies</h4>\n              </div>\n              <div class=\"flex items-center gap-2\">\n                <ui-checkbox\n                  id=\"mh-has-allergies\"\n                  [checked]=\"form().hasAllergies\"\n                  (checkedChange)=\"setField('hasAllergies', !!$event)\"\n                  label=\"I have known allergies\"\n                />\n              </div>\n            </div>\n            @if (form().hasAllergies) {\n              <div class=\"space-y-1.5 pt-1\">\n                <label ui-label for=\"mh-allergy-details\" class=\"text-xs\">\n                  List Specific Allergens & Adverse Reactions *\n                </label>\n                <ui-input\n                  id=\"mh-allergy-details\"\n                  [value]=\"form().allergyDetails\"\n                  (valueChange)=\"setField('allergyDetails', $event)\"\n                  placeholder=\"e.g., Penicillin (Anaphylaxis), Sulfa (Severe Rash), Peanuts (Hives), Latex\"\n                  size=\"small\"\n                />\n              </div>\n            } @else {\n              <p class=\"text-muted-foreground text-xs italic\">No known drug, latex, or food allergies reported.</p>\n            }\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-2\">\n            <div class=\"flex items-center gap-2\">\n              <lucide-icon [img]=\"Stethoscope\" class=\"text-primary size-4\" />\n              <label ui-label for=\"mh-medications\" class=\"text-xs font-semibold\">\n                Current Prescription & OTC Medications\n              </label>\n            </div>\n            <ui-textarea\n              id=\"mh-medications\"\n              [value]=\"form().currentMedications\"\n              (valueChange)=\"setField('currentMedications', $event)\"\n              [rows]=\"3\"\n              placeholder=\"Include drug name, dosage, and schedule (e.g., Lisinopril 10mg once daily in AM, Metformin 500mg BID with meals)...\"\n              class=\"text-xs\"\n            />\n            <p class=\"text-muted-foreground text-xs\">\n              Include all daily vitamins, herbal supplements, inhalers, and injections.\n            </p>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-2\">\n            <div class=\"flex items-center gap-2\">\n              <lucide-icon [img]=\"FileText\" class=\"text-primary size-4\" />\n              <label ui-label for=\"mh-surgeries\" class=\"text-xs font-semibold\">\n                Past Surgeries, Major Injuries & Hospitalizations\n              </label>\n            </div>\n            <ui-textarea\n              id=\"mh-surgeries\"\n              [value]=\"form().pastSurgeries\"\n              (valueChange)=\"setField('pastSurgeries', $event)\"\n              [rows]=\"2\"\n              placeholder=\"List approximate year and procedure (e.g., Appendectomy 2016, Knee Arthroscopy 2021)...\"\n              class=\"text-xs\"\n            />\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-3\">\n            <h4 class=\"text-foreground text-xs font-semibold\">Primary Care Provider / Referring Clinic</h4>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"mh-pcp-name\" class=\"text-xs\">Physician or Practice Name</label>\n                <ui-input\n                  id=\"mh-pcp-name\"\n                  [value]=\"form().primaryCarePhysician\"\n                  (valueChange)=\"setField('primaryCarePhysician', $event)\"\n                  placeholder=\"Dr. Robert Chen, MD\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"mh-clinic-phone\" class=\"text-xs\">Clinic Contact / Phone</label>\n                <ui-input\n                  id=\"mh-clinic-phone\"\n                  [value]=\"form().clinicPhone\"\n                  (valueChange)=\"setField('clinicPhone', $event)\"\n                  placeholder=\"(555) 601-2290\"\n                  size=\"small\"\n                />\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n\n      <!-- STEP 3: Insurance & Billing -->\n      @if (step() === 3) {\n        <div class=\"space-y-6\">\n          <div class=\"space-y-3\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"Building2\" class=\"text-primary size-4\" />\n                <h3 class=\"text-foreground text-xs font-semibold\">Primary Medical Insurance Carrier</h3>\n              </div>\n              <span ui-badge wrap variant=\"outline\" class=\"text-xs\">Primary Plan</span>\n            </div>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-3\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"ins-carrier\" class=\"text-xs\">Insurance Carrier *</label>\n                <ui-select [value]=\"form().insuranceCarrier\" (valueChange)=\"setField('insuranceCarrier', $event)\">\n                  <button ui-select-trigger id=\"ins-carrier\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Select carrier\" />\n                  </button>\n                  <ui-select-content>\n                    @for (carrier of insuranceCarriers; track carrier.id) {\n                      <ui-select-item [value]=\"carrier.id\">{{ carrier.label }}</ui-select-item>\n                    }\n                  </ui-select-content>\n                </ui-select>\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"ins-member-id\" class=\"text-xs\">Member / Subscriber ID *</label>\n                <ui-input\n                  id=\"ins-member-id\"\n                  [value]=\"form().memberId\"\n                  (valueChange)=\"setField('memberId', $event)\"\n                  placeholder=\"e.g. XEH-902814891\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"ins-group-num\" class=\"text-xs\">Group Number</label>\n                <ui-input\n                  id=\"ins-group-num\"\n                  [value]=\"form().groupNumber\"\n                  (valueChange)=\"setField('groupNumber', $event)\"\n                  placeholder=\"e.g. GRP-44028\"\n                  size=\"small\"\n                />\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-3\">\n            <h3 class=\"text-foreground flex items-center gap-2 text-xs font-semibold\">\n              <lucide-icon [img]=\"User\" class=\"text-primary size-3.5\" />\n              Primary Policyholder Information\n            </h3>\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"ins-holder-name\" class=\"text-xs\">Primary Insured Full Legal Name *</label>\n                <ui-input\n                  id=\"ins-holder-name\"\n                  [value]=\"form().policyholderName\"\n                  (valueChange)=\"setField('policyholderName', $event)\"\n                  placeholder=\"Policyholder name\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5\">\n                <label ui-label for=\"ins-holder-rel\" class=\"text-xs\">Relationship to Patient *</label>\n                <ui-select\n                  [value]=\"form().policyholderRelationship\"\n                  (valueChange)=\"setField('policyholderRelationship', $event)\"\n                >\n                  <button ui-select-trigger id=\"ins-holder-rel\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Relationship\" />\n                  </button>\n                  <ui-select-content>\n                    <ui-select-item value=\"self\">Self (Patient is Policyholder)</ui-select-item>\n                    <ui-select-item value=\"spouse\">Spouse</ui-select-item>\n                    <ui-select-item value=\"child\">Child / Dependent</ui-select-item>\n                    <ui-select-item value=\"other\">Other Legal Custodian</ui-select-item>\n                  </ui-select-content>\n                </ui-select>\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-3\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"CreditCard\" class=\"text-primary size-4\" />\n                <h3 class=\"text-foreground text-xs font-semibold\">Insurance Card Photo Verification</h3>\n              </div>\n              <span class=\"text-muted-foreground text-xs\">PNG, JPG, PDF up to 10MB</span>\n            </div>\n            <p class=\"text-muted-foreground text-xs\">\n              Provide high-resolution photos of both front and back sides of your insurance card for optical character\n              recognition (OCR) and benefit eligibility verification.\n            </p>\n\n            <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n              <div\n                class=\"border-border bg-card hover:bg-muted/20 flex flex-col justify-between rounded-xl border p-4 text-center transition-colors\"\n              >\n                <div class=\"space-y-2 py-3\">\n                  <div class=\"bg-primary/10 text-primary mx-auto flex size-10 items-center justify-center rounded-full\">\n                    <lucide-icon [img]=\"CreditCard\" class=\"size-5\" />\n                  </div>\n                  <div class=\"space-y-0.5\">\n                    <p class=\"text-foreground text-xs font-semibold\">Front of Insurance Card</p>\n                    <p class=\"text-muted-foreground text-xs\">Subscriber ID & carrier logo visible</p>\n                  </div>\n                </div>\n                <div\n                  class=\"border-border/60 bg-muted/40 flex flex-wrap items-center justify-between rounded-md border px-3 py-2 text-xs\"\n                >\n                  @if (form().frontCardUploaded) {\n                    <span class=\"text-success flex items-center gap-1.5 font-medium\">\n                      <lucide-icon [img]=\"Check\" class=\"size-3.5\" />\n                      card_front_scan.jpg (2.4 MB)\n                    </span>\n                  } @else {\n                    <span class=\"text-muted-foreground\">No file selected</span>\n                  }\n                  <button\n                    ui-button\n                    type=\"button\"\n                    variant=\"outline\"\n                    size=\"sm\"\n                    class=\"h-7 text-xs font-medium\"\n                    (click)=\"toggleUpload('frontCardUploaded')\"\n                  >\n                    {{ form().frontCardUploaded ? 'Replace' : 'Upload Front' }}\n                  </button>\n                </div>\n              </div>\n\n              <div\n                class=\"border-border bg-card hover:bg-muted/20 flex flex-col justify-between rounded-xl border p-4 text-center transition-colors\"\n              >\n                <div class=\"space-y-2 py-3\">\n                  <div class=\"bg-primary/10 text-primary mx-auto flex size-10 items-center justify-center rounded-full\">\n                    <lucide-icon [img]=\"CreditCard\" class=\"size-5\" />\n                  </div>\n                  <div class=\"space-y-0.5\">\n                    <p class=\"text-foreground text-xs font-semibold\">Back of Insurance Card</p>\n                    <p class=\"text-muted-foreground text-xs\">Claims address & Rx BIN visible</p>\n                  </div>\n                </div>\n                <div\n                  class=\"border-border/60 bg-muted/40 flex flex-wrap items-center justify-between rounded-md border px-3 py-2 text-xs\"\n                >\n                  @if (form().backCardUploaded) {\n                    <span class=\"text-success flex items-center gap-1.5 font-medium\">\n                      <lucide-icon [img]=\"Check\" class=\"size-3.5\" />\n                      card_back_scan.jpg (1.9 MB)\n                    </span>\n                  } @else {\n                    <span class=\"text-muted-foreground\">No file selected</span>\n                  }\n                  <button\n                    ui-button\n                    type=\"button\"\n                    variant=\"outline\"\n                    size=\"sm\"\n                    class=\"h-7 text-xs font-medium\"\n                    (click)=\"toggleUpload('backCardUploaded')\"\n                  >\n                    {{ form().backCardUploaded ? 'Replace' : 'Upload Back' }}\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n\n      <!-- STEP 4: Consent & Sign -->\n      @if (step() === 4) {\n        <div class=\"space-y-6\">\n          <div class=\"space-y-2\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"FileText\" class=\"text-primary size-4\" />\n                <h3 class=\"text-foreground text-xs font-semibold\">Regulatory Disclosures & Legal Notice</h3>\n              </div>\n              <span ui-badge wrap variant=\"secondary\" class=\"text-xs\">Mandatory Acknowledgement</span>\n            </div>\n            <div\n              class=\"border-border bg-muted/20 text-muted-foreground max-h-40 space-y-3 overflow-y-auto rounded-lg border p-3.5 text-xs leading-relaxed\"\n            >\n              <div>\n                <span class=\"text-foreground font-semibold\">1. HIPAA Notice of Privacy Practices:</span>\n                I acknowledge receipt and review of the Notice of Privacy Practices, which describes how my Protected\n                Health Information (PHI) may be used and disclosed for clinical treatment, payment processing, and\n                healthcare operations in strict compliance with the HIPAA Omnibus Rule (45 CFR § 164.520).\n              </div>\n              <div>\n                <span class=\"text-foreground font-semibold\">2. Informed Consent for Outpatient Treatment:</span>\n                I voluntarily authorize the clinical physicians and allied healthcare team to perform diagnostic\n                evaluations, blood tests, physical examinations, and outpatient clinical care deemed medically\n                necessary.\n              </div>\n              <div>\n                <span class=\"text-foreground font-semibold\">3. Assignment of Benefits & Financial Agreement:</span>\n                I assign all medical insurance benefits directly to the provider. I acknowledge that I remain\n                financially responsible for copayments, deductibles, and non-covered services not adjudicated by my\n                carrier.\n              </div>\n            </div>\n          </div>\n\n          <div class=\"divide-border divide-y rounded-lg border\">\n            <div class=\"flex items-start gap-3 p-3.5\">\n              <ui-checkbox\n                id=\"cs-hipaa-consent\"\n                [checked]=\"form().hipaaConsent\"\n                (checkedChange)=\"setField('hipaaConsent', !!$event)\"\n                class=\"mt-0.5\"\n              />\n              <div class=\"space-y-0.5\">\n                <label ui-label for=\"cs-hipaa-consent\" class=\"cursor-pointer text-xs font-medium\">\n                  HIPAA Privacy Practices Acknowledgement *\n                </label>\n                <p class=\"text-muted-foreground text-xs\">\n                  I have read, understood, and accept the HIPAA Notice of Privacy Practices and consent to electronic\n                  medical record management.\n                </p>\n              </div>\n            </div>\n\n            <div class=\"flex items-start gap-3 p-3.5\">\n              <ui-checkbox\n                id=\"cs-treatment-consent\"\n                [checked]=\"form().treatmentConsent\"\n                (checkedChange)=\"setField('treatmentConsent', !!$event)\"\n                class=\"mt-0.5\"\n              />\n              <div class=\"space-y-0.5\">\n                <label ui-label for=\"cs-treatment-consent\" class=\"cursor-pointer text-xs font-medium\">\n                  Informed Treatment Consent & Benefit Assignment *\n                </label>\n                <p class=\"text-muted-foreground text-xs\">\n                  I authorize medical evaluation and agree to the assignment of insurance benefits to the clinical care\n                  provider.\n                </p>\n              </div>\n            </div>\n\n            <div class=\"flex items-start gap-3 p-3.5\">\n              <ui-checkbox\n                id=\"cs-telehealth-consent\"\n                [checked]=\"form().telehealthConsent\"\n                (checkedChange)=\"setField('telehealthConsent', !!$event)\"\n                class=\"mt-0.5\"\n              />\n              <div class=\"space-y-0.5\">\n                <label ui-label for=\"cs-telehealth-consent\" class=\"cursor-pointer text-xs font-medium\">\n                  Telehealth & Encrypted Digital Communications (Optional)\n                </label>\n                <p class=\"text-muted-foreground text-xs\">\n                  I consent to virtual video consultations and automated SMS/email appointment notifications and lab\n                  report alerts.\n                </p>\n              </div>\n            </div>\n          </div>\n\n          <ui-separator />\n\n          <div class=\"space-y-4\">\n            <div class=\"flex flex-wrap items-center justify-between\">\n              <div class=\"flex items-center gap-2\">\n                <lucide-icon [img]=\"Lock\" class=\"text-primary size-4\" />\n                <h3 class=\"text-foreground text-xs font-semibold\">Electronic Signature & Digital Certification</h3>\n              </div>\n              <span ui-badge wrap variant=\"outline\" class=\"border-primary/30 text-primary font-mono text-xs\">\n                256-bit Certified\n              </span>\n            </div>\n\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-3\">\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"cs-signer-name\" class=\"text-xs\">Type Full Legal Name as Signature *</label>\n                <ui-input\n                  id=\"cs-signer-name\"\n                  [value]=\"form().signatureName\"\n                  (valueChange)=\"setField('signatureName', $event)\"\n                  placeholder=\"e.g. Eleanor R. Vance\"\n                  size=\"small\"\n                />\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"cs-signer-role\" class=\"text-xs\">Signer Capacity / Role *</label>\n                <ui-select [value]=\"form().signerRole\" (valueChange)=\"setField('signerRole', $event)\">\n                  <button ui-select-trigger id=\"cs-signer-role\" size=\"sm\" class=\"h-8 text-xs\">\n                    <ui-select-value placeholder=\"Select role\" />\n                  </button>\n                  <ui-select-content>\n                    <ui-select-item value=\"patient\">Patient (Self)</ui-select-item>\n                    <ui-select-item value=\"parent_guardian\">Parent / Legal Guardian</ui-select-item>\n                    <ui-select-item value=\"poa\">Medical Power of Attorney</ui-select-item>\n                  </ui-select-content>\n                </ui-select>\n              </div>\n              <div class=\"space-y-1.5 sm:col-span-1\">\n                <label ui-label for=\"cs-sig-date\" class=\"text-xs\">Signature Date *</label>\n                <ui-input\n                  id=\"cs-sig-date\"\n                  [value]=\"form().signatureDate\"\n                  (valueChange)=\"setField('signatureDate', $event)\"\n                  type=\"date\"\n                  size=\"small\"\n                />\n              </div>\n            </div>\n\n            <div class=\"border-primary/30 bg-primary/5 space-y-3 rounded-xl border p-4\">\n              <div class=\"flex flex-wrap items-center justify-between\">\n                <span class=\"text-muted-foreground text-xs font-medium\"> Legal Digital Signature Stamp </span>\n                <span class=\"text-primary flex items-center gap-1 font-mono text-xs\">\n                  <lucide-icon [img]=\"ShieldCheck\" class=\"size-3.5\" />\n                  Verified & Timestamped\n                </span>\n              </div>\n\n              <div class=\"border-primary/20 border-b pt-1 pb-3\">\n                <p class=\"text-primary text-2xl font-medium tracking-wide italic\">\n                  {{ form().signatureName || 'Your Signature' }}\n                </p>\n              </div>\n\n              <div class=\"text-muted-foreground flex flex-wrap items-center justify-between gap-2 font-mono text-xs\">\n                <span>Signer: {{ form().signatureName || 'Eleanor Vance' }} ({{ form().signerRole }})</span>\n                <span>Date: {{ form().signatureDate }} · Ref #SIG-49102-HIPAA</span>\n              </div>\n            </div>\n          </div>\n        </div>\n      }\n\n      <!-- STEP 5: Success / Confirmation Receipt -->\n      @if (step() === 5) {\n        <div class=\"space-y-6 py-4 text-center\">\n          <div\n            class=\"border-success/30 bg-success/10 text-success mx-auto flex size-16 items-center justify-center rounded-full border shadow-xs\"\n          >\n            <lucide-icon [img]=\"Check\" class=\"size-8\" />\n          </div>\n\n          <div class=\"space-y-1\">\n            <h3 class=\"text-foreground text-xl font-bold tracking-tight\">Patient Intake Submitted Successfully</h3>\n            <p class=\"text-muted-foreground mx-auto max-w-md text-xs sm:text-sm\">\n              Your new patient registration and encrypted medical disclosures have been received and queued for clinical\n              triage.\n            </p>\n          </div>\n\n          <div class=\"border-border inline-flex items-center gap-2 rounded-full border px-3 py-1 text-xs\">\n            <span class=\"text-muted-foreground\">Confirmation ID:</span>\n            <span class=\"text-foreground font-mono font-bold\">{{ intakeId() }}</span>\n          </div>\n\n          <div class=\"border-border bg-muted/30 mx-auto max-w-xl space-y-3 rounded-xl border p-4 text-left text-xs\">\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n              <div>\n                <span class=\"text-muted-foreground block\">Patient Name:</span>\n                <span class=\"text-foreground font-semibold\"\n                  >{{ form().firstName }} {{ form().middleName }} {{ form().lastName }}</span\n                >\n              </div>\n              <div>\n                <span class=\"text-muted-foreground block\">Date of Birth:</span>\n                <span class=\"text-foreground font-medium tabular-nums\"\n                  >{{ form().dob }} ({{ form().biologicalSex }})</span\n                >\n              </div>\n              <div>\n                <span class=\"text-muted-foreground block\">Primary Insurance:</span>\n                <span class=\"text-foreground font-medium\"\n                  >{{ selectedCarrierLabel() }} (ID: {{ form().memberId }})</span\n                >\n              </div>\n              <div>\n                <span class=\"text-muted-foreground block\">Emergency Contact:</span>\n                <span class=\"text-foreground font-medium\"\n                  >{{ form().emergencyName }} ({{ form().emergencyPhone }})</span\n                >\n              </div>\n              <div\n                class=\"border-border/60 col-span-1 flex flex-wrap items-center justify-between border-t pt-2 sm:col-span-2\"\n              >\n                <span class=\"text-muted-foreground\">Legal Signature:</span>\n                <span class=\"text-primary font-medium tracking-wide italic\"\n                  >{{ form().signatureName }} ({{ form().signatureDate }})</span\n                >\n              </div>\n            </div>\n          </div>\n\n          <div class=\"flex flex-wrap items-center justify-center gap-3 pt-2\">\n            <button\n              ui-button\n              aria-label=\"Download attachment\"\n              variant=\"outline\"\n              size=\"sm\"\n              class=\"gap-1.5 text-xs font-medium\"\n            >\n              <lucide-icon [img]=\"Download\" class=\"size-3.5\" />\n              Download Intake PDF\n            </button>\n            <button ui-button size=\"sm\" class=\"gap-1.5 text-xs font-medium\" (click)=\"resetForm()\">\n              <lucide-icon [img]=\"RotateCcw\" class=\"size-3.5\" />\n              Register Another Patient\n            </button>\n          </div>\n        </div>\n      }\n\n      <div slot=\"footer\" class=\"border-border bg-muted/20 flex w-full items-center justify-between border-t px-6 py-4\">\n        @if (step() > 1 && step() <= 4) {\n          <button ui-button variant=\"ghost\" size=\"sm\" class=\"gap-1.5 text-xs font-medium\" (click)=\"goBack()\">\n            <lucide-icon [img]=\"ChevronLeft\" class=\"size-4\" />\n            Back\n          </button>\n        } @else {\n          <span aria-hidden=\"true\"></span>\n        }\n\n        @if (step() <= 4) {\n          <span class=\"text-muted-foreground text-xs font-medium\"> Step {{ step() }} of 4 — {{ stepTitle() }} </span>\n        } @else {\n          <span class=\"text-muted-foreground text-xs font-medium\">Registration Complete</span>\n        }\n\n        @if (step() < 4) {\n          <button\n            ui-button\n            size=\"sm\"\n            class=\"gap-1.5 text-xs font-medium\"\n            [disabled]=\"continueDisabled()\"\n            (click)=\"goNext()\"\n          >\n            Continue\n            <lucide-icon [img]=\"ChevronRight\" class=\"size-4\" />\n          </button>\n        } @else if (step() === 4) {\n          <button\n            ui-button\n            size=\"sm\"\n            class=\"bg-primary text-primary-foreground gap-1.5 text-xs font-medium\"\n            [disabled]=\"submitDisabled()\"\n            (click)=\"handleSubmit()\"\n          >\n            <lucide-icon [img]=\"FileCheck\" class=\"size-4\" />\n            Submit Registration\n          </button>\n        } @else {\n          <span aria-hidden=\"true\"></span>\n        }\n      </div>\n    </ui-section-card>\n  `,\n})\nexport class UiPatientIntakeFormComponent {\n  protected readonly Activity = Activity\n  protected readonly AlertTriangle = AlertTriangle\n  protected readonly Building2 = Building2\n  protected readonly Calendar = Calendar\n  protected readonly Check = Check\n  protected readonly ChevronLeft = ChevronLeft\n  protected readonly ChevronRight = ChevronRight\n  protected readonly CreditCard = CreditCard\n  protected readonly Download = Download\n  protected readonly FileCheck = FileCheck\n  protected readonly FileText = FileText\n  protected readonly Lock = Lock\n  protected readonly Phone = Phone\n  protected readonly RotateCcw = RotateCcw\n  protected readonly ShieldCheck = ShieldCheck\n  protected readonly Stethoscope = Stethoscope\n  protected readonly User = User\n  protected readonly UserCheck = UserCheck\n\n  protected readonly steps = steps\n  protected readonly chronicConditions = CHRONIC_CONDITIONS\n  protected readonly insuranceCarriers = INSURANCE_CARRIERS\n\n  @Input('class') className?: string\n\n  readonly step = signal(1)\n  readonly submitted = signal(false)\n  readonly intakeId = signal('INTAKE-2026-8942')\n  readonly form = signal<PatientIntakeData>({\n    ...DEFAULT_FORM,\n    chronicConditions: [...DEFAULT_FORM.chronicConditions],\n  })\n\n  @Input('initialStep') set initialStepAttr(v: number | undefined) {\n    if (v !== undefined) this.step.set(v)\n  }\n  @Input('initialData') set initialDataAttr(v: Partial<PatientIntakeData> | undefined) {\n    if (v !== undefined) {\n      this.form.update((prev) => ({\n        ...prev,\n        ...v,\n        chronicConditions: v.chronicConditions ? [...v.chronicConditions] : [...prev.chronicConditions],\n      }))\n    }\n  }\n\n  @Output() readonly submit = new EventEmitter<PatientIntakeData>()\n  @Output() readonly stepChange = new EventEmitter<number>()\n\n  readonly selectedCarrierLabel = computed(() => {\n    const found = INSURANCE_CARRIERS.find((c) => c.id === this.form().insuranceCarrier)\n    return found ? found.label : this.form().insuranceCarrier\n  })\n\n  readonly stepTitle = computed(() => steps[this.step() - 1]?.title ?? '')\n\n  readonly continueDisabled = computed(\n    () => this.step() === 1 && (this.form().firstName.trim() === '' || this.form().lastName.trim() === ''),\n  )\n\n  readonly submitDisabled = computed(\n    () => !this.form().hipaaConsent || !this.form().treatmentConsent || this.form().signatureName.trim() === '',\n  )\n\n  get cardClass(): string {\n    return cn('max-w-4xl', this.className)\n  }\n\n  setField<K extends keyof PatientIntakeData>(key: K, value: PatientIntakeData[K]): void {\n    this.form.update((prev) => ({ ...prev, [key]: value }))\n  }\n\n  toggleCondition(conditionId: string, checked: boolean | 'indeterminate'): void {\n    this.form.update((prev) => {\n      if (checked === true) {\n        if (prev.chronicConditions.includes(conditionId)) return prev\n        return { ...prev, chronicConditions: [...prev.chronicConditions, conditionId] }\n      }\n      return { ...prev, chronicConditions: prev.chronicConditions.filter((id) => id !== conditionId) }\n    })\n  }\n\n  toggleUpload(key: 'frontCardUploaded' | 'backCardUploaded'): void {\n    this.form.update((prev) => ({ ...prev, [key]: !prev[key] }))\n  }\n\n  onStepperInput(value: number): void {\n    // Backward navigation through the stepper is free; forward goes through Continue.\n    if (value < this.step() && this.step() !== 5) {\n      this.step.set(value)\n      this.stepChange.emit(value)\n    }\n  }\n\n  goNext(): void {\n    if (this.step() < 4) {\n      const next = this.step() + 1\n      this.step.set(next)\n      this.stepChange.emit(next)\n    }\n  }\n\n  goBack(): void {\n    if (this.step() > 1 && this.step() <= 4) {\n      const prev = this.step() - 1\n      this.step.set(prev)\n      this.stepChange.emit(prev)\n    }\n  }\n\n  handleSubmit(): void {\n    this.submitted.set(true)\n    this.step.set(5)\n    const form = this.form()\n    this.submit.emit({ ...form, chronicConditions: [...form.chronicConditions] })\n    this.stepChange.emit(5)\n  }\n\n  resetForm(): void {\n    this.step.set(1)\n    this.submitted.set(false)\n    this.stepChange.emit(1)\n  }\n}\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/patient-intake-form/patient-intake-form.component.ts"
    },
    {
      "path": "packages/registry-angular/blocks/patient-intake-form/index.ts",
      "content": "export { UiPatientIntakeFormComponent, type PatientIntakeData } from './patient-intake-form.component'\n",
      "type": "registry:block",
      "target": "~/src/app/components/blocks/patient-intake-form/index.ts"
    }
  ],
  "dependencies": [
    "lucide-angular"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/angular/badge.json",
    "https://uipkge.dev/r/angular/button.json",
    "https://uipkge.dev/r/angular/checkbox.json",
    "https://uipkge.dev/r/angular/input.json",
    "https://uipkge.dev/r/angular/label.json",
    "https://uipkge.dev/r/angular/section-card.json",
    "https://uipkge.dev/r/angular/select.json",
    "https://uipkge.dev/r/angular/separator.json",
    "https://uipkge.dev/r/angular/stepper.json",
    "https://uipkge.dev/r/angular/textarea.json"
  ],
  "description": "HIPAA-compliant new patient registration and medical history questionnaire in a SectionCard. Features a 4-step Stepper (Personal Information → Medical History → Insurance & Billing → Consent & Sign), demographic inputs with biological sex and emergency contact, chronic conditions checklist with allergy details and medication textareas, insurance carrier selection with card photo upload dropzones, regulatory HIPAA disclosure accordion with electronic signature pad, and a post-submission confirmation receipt with patient ID.",
  "categories": [
    "healthcare",
    "app",
    "forms"
  ]
}