SelectPC = e => {
                            afterSelectPC(e);
                            e.System.SetFocus(mainRef.Current);
                        },
                        OnCancel = e => e.System.SetFocus(mainRef.Current),
                    }),
                    new Window(new WindowProps
                    {
                        AllowNavigate = false,
                        Name = "main",
                        OnCancel = Props.OnExit,
                        Ref = mainRef,
                        Children =
                        {
                            new Button(new ButtonProps { Text = "Items", OnAccept = RunItemsMenu  }),
                            new Button(new ButtonProps { Text = "Skills", OnAccept = e => SelectPCThen(e, RunSkillsMenu) }),
                            new Button(new ButtonProps { Text = "Equip",  OnAccept = e => SelectPCThen(e, RunEquipMenu) }),
                            new Button(new ButtonProps { Text = "Relic",  OnAccept = e => SelectPCThen(e, RunRelicMenu) }),
                            new Button(new ButtonProps { Text = "Status", OnAccept = RunStatusMenu }),
                            new Button(new ButtonProps { Text = "Config", OnAccept = RunConfigMenu }),
                            new Button(new ButtonProps { Text = "Save",   OnAccept = RunSaveMenu   }),
                        },
                    }),
                },
            });
        }

        private void SelectPCThen(UserInterfaceEvent e, Action<UserInterfaceEvent, PlayerCharacter> thenDo)
        {
            e.System.SetFocus(selectPcRef.Current);

            afterSelectPC = y => thenDo(y, y.Data);
        }

        private void RunEquipMenu(UserInterfaceEvent evt, PlayerCharacter pc)
        {
            evt.System.PushWorkspace(new Workspace("equip", new FF6EquipMenu(new FF6EquipMenuProps
            {
                PlayerCharacter = pc,
                Inventory = Props.Model.Inventory,
                EquipmentSlots = Props.Model.EquipmentSlots.Where(x =>!x.Name.Contains("Relic")),
                OnEquip = Props.OnEquip,
                OnEquipRemove = Props.OnEquipRemove,
                OnEquipOptimum = Props.OnEquipOptimum,
                OnEquipEmpty = Props.OnEquipEmpty,
                OnCancel = e => e.System.PopWorkspace(),
            })));
        }

        private void RunRelicMenu(UserInterfaceEvent evt, PlayerCharacter pc)
        {
            evt.System.PushWorkspace(new Workspace("relic", new FF6RelicMenu(new FF6RelicMenuProps
            {
                PlayerCharacter = pc,
                Inventory = Props.Model.Inventory,
                EquipmentSlots = Props.Model.EquipmentSlots.Where(x => x.Name.Contains("Relic")),
                OnEquip = Props.OnEquip,
                OnEquipRemove = Props.OnEquipRemove,
                OnCancel = e => e.System.PopWorkspace(),
            })));
        }

        private void RunStatusMenu(UserInterfaceEvent e)
        {
        }

        private void RunConfigMenu(UserInterfaceEvent e)
        {
        }

        private void RunSaveMenu(UserInterfaceEvent e)
        {
        }

        private void RunItemsMenu(UserInterfaceEvent evt)
        {
            evt.System.PushWorkspace(new Workspace("items", new FF6ItemsMenu(new FF6ItemsMenuProps
            {
                Inventory = Props.Model.Inventory,
                OnUseItem = UseItem,
                OnSwapItems = e =>
                {
                    Props.OnSwapItems(e);
                    SetState(state => state.Inventory = Props.Model.Inventory);
                },
                OnCancel = e => e.System.PopWorkspace(),
                OnArrangeItems = e =>
                {
                    Props.OnArrangeItems(e);
                    SetState(state =>
                    {
                        state.Inventory = Props.Model.Inventory;
                    });
                },
            })));
        }

        private void UseItem(UserInterfaceEvent<Item> e)
        {
            switch (e.Data.Effect)
            {
                case "heal":
                    SelectItemTarget(e, targetPc
                        => Props.OnUseItem?.Invoke(new UserInterfaceEvent<Tuple<Item, PlayerCharacter>>().Reset(e,
                        new Tuple<Item, PlayerCharacter>(e.Data, targetPc))));

                    break;
            }
        }

        private void SelectItemTarget(UserInterfaceEvent<Item> evt, Action<PlayerCharacter> afterSelection)
        {
            Workspace workspace = null;

            workspace = new Workspace("itemTarget", new FF6ItemTarget(new FF6ItemTargetProps
            {
                Characters = Props.Model.Party.Characters.ToList(),
                OnAccept = e =>
                {
                    workspace.TransitionOut();
                    afterSelection(e.Data);
                }
            }));

            evt.System.PushWorkspace(workspace);
        }

        private void RunSkillsMenu(UserInterfaceEvent evt, PlayerCharacter pc)
        {
            evt.System.PushWorkspace(new Workspace("skills", new FF6SkillsMenu(new FF6SkillsMenuProps
            {
                OnCancel = e => e.System.PopWorkspace(),
                OnMagic = e => e.System.PushWorkspace(RunMagicMenu(pc)),
                OnEspers = e => e.System.PushWorkspace(RunEspersMenu(pc)),
            })));
        }

        private Workspace RunEspersMenu(PlayerCharacter pc)
        {
            return new Workspace("espers", new FF6EspersMenu(new FF6EspersMenuProps
            {
                OnCancel = e => e.System.PopWorkspace()
            }));
        }

        private Workspace RunMagicMenu(PlayerCharacter pc)
        {
            return new Workspace("magic", new FF6MagicMenu(new FF6MagicMenuProps
            {
                OnCancel = e => e.System.PopWorkspace()
            }));
        }
    }

    public class FF6MainMenuProps : WidgetProps
    {
        public FF6Model Model { get; set; }
        public UserInterfaceEventHandler OnArrangeItems { get; set; }
        public UserInterfaceEventHandler<Tuple<Item, PlayerCharacter>> OnUseItem { get; set; }
        public UserInterfaceEventHandler<Tuple<int, int>> OnSwapItems { get; set; }
        public UserInterfaceEventHandler<PlayerCharacter, string, Item> OnEquip { get; set; }
        public UserInterfaceEventHandler<PlayerCharacter, string> OnEquipRemove { get; set; }
        public UserInterfaceEventHandler<PlayerCharacter> OnEquipOptimum { get; set; }
        public UserInterfaceEventHandler<PlayerCharacter> OnEquipEmpty { get; set; }
        public UserInterfaceEventHandler OnExit { get; set; }
    }

    public class FF6MainMenuState : WidgetState
    {
        public IEnumerable<PlayerCharacter> Characters { get; set; }
        public List<Item> Inventory { get; set; }
    }
}
This study tests an implication of the real-options theory of investment, that uncertainty leads firms to prefer technologies with low fixed and high variable costs. In 1983, a change in Medicare reimbursement increased the uncertainty of revenues for hospitals. Using a sample of 831 departments in 59 Washington State hospitals over the 1977-1994 period, we find that the ratio of variable to total costs increased after 1983. This increase is not attributable to a gradual increase in the ratio over time: We estimate a significant increase after 1983 even after controlling for a time trend. Further, we find a greater increase in the variable-to-total cost ratio for hospitals that had higher percentages of Medicare patients, increasing our confidence in the conclusion that the change in cost behavior is attributable to Medicare's change in reimbursement. Copyright ©, University of Chicago on behalf of the Institute of Professional Accounting, 2005.
The Genetic Variability of APOE in Different Human Populations and Its Implications for Longevity

Human longevity is a complex phenotype resulting from the combinations of context-dependent gene-environment interactions that require analysis as a dynamic process in a cohesive ecological and evolutionary framework. Genome-wide association (GWAS) and whole-genome sequencing (WGS) studies on centenarians pointed toward the inclusion of the apolipoprotein E (APOE) polymorphisms ε2 and ε4, as implicated in the attainment of extreme longevity, which refers to their effect in age-related Alzheimer’s disease (AD) and cardiovascular disease (CVD). In this case, the available literature