popup improvements, citation fix

This commit is contained in:
Levi Neuwirth 2026-03-29 08:02:04 -04:00
parent b6b6903bdf
commit b06b1e741c
7 changed files with 327 additions and 1066 deletions

View File

@ -139,14 +139,16 @@ transformInline keyNums (Cite citations _) =
nums = mapMaybe (`Map.lookup` keyNums) keys
in if null nums
then Str ""
else RawInline "html" (markerHtml (head keys) (head nums) nums)
else RawInline "html" (markerHtml keys (head keys) (head nums) nums)
transformInline _ x = x
markerHtml :: Text -> Int -> [Int] -> Text
markerHtml firstKey firstNum nums =
markerHtml :: [Text] -> Text -> Int -> [Int] -> Text
markerHtml keys firstKey firstNum nums =
let label = "[" <> T.intercalate "," (map tshow nums) <> "]"
allIds = T.intercalate " " (map ("ref-" <>) keys)
in "<sup class=\"cite-marker\" id=\"cite-back-" <> tshow firstNum <> "\">"
<> "<a href=\"#ref-" <> firstKey <> "\" class=\"cite-link\">"
<> "<a href=\"#ref-" <> firstKey <> "\" class=\"cite-link\""
<> " data-cite-keys=\"" <> allIds <> "\">"
<> label <> "</a></sup>"
where tshow = T.pack . show
@ -196,10 +198,10 @@ entryOrder _ _ = maxBound
-- | Prepend [N] marker to a bibliography entry block.
addNumber :: Int -> Block -> Block
addNumber n (Div attrs content) =
addNumber n (Div attrs@(divId, _, _) content) =
Div attrs
( Plain [ RawInline "html"
("<span class=\"ref-num\">[" <> T.pack (show n) <> "]</span>") ]
("<a class=\"ref-num\" href=\"#" <> divId <> "\">[" <> T.pack (show n) <> "]</a>") ]
: content )
addNumber _ b = b

View File

@ -49,7 +49,7 @@ constraints: any.Glob ==0.10.2,
any.conduit ==1.3.6.1,
any.conduit-extra ==1.3.8,
any.containers ==0.6.7,
any.contravariant ==1.5.5,
any.contravariant ==1.5.6,
any.cookie ==0.5.0,
any.crypton ==1.0.4,
any.crypton-connection ==0.4.5,
@ -113,7 +113,7 @@ constraints: any.Glob ==0.10.2,
any.lifted-base ==0.2.3.12,
any.lrucache ==1.2.0.1,
any.memory ==0.18.0,
any.mime-types ==0.1.2.0,
any.mime-types ==0.1.2.1,
any.monad-control ==1.0.3.1,
any.monad-logger ==0.3.42,
monad-logger +template_haskell,
@ -142,7 +142,7 @@ constraints: any.Glob ==0.10.2,
any.prettyprinter-ansi-terminal ==1.1.3,
any.primitive ==0.9.1.0,
any.process ==1.6.19.0,
any.psqueues ==0.2.8.2,
any.psqueues ==0.2.8.3,
any.random ==1.2.1.3,
any.recv ==0.1.1,
any.regex-base ==0.94.0.3,
@ -153,7 +153,7 @@ constraints: any.Glob ==0.10.2,
any.rts ==1.0.2,
any.safe ==0.3.21,
any.safe-exceptions ==0.1.7.4,
any.scientific ==0.3.8.0,
any.scientific ==0.3.8.1,
any.semialign ==1.3.1,
any.semigroupoids ==6.0.2,
any.serialise ==0.2.6.1,
@ -215,7 +215,7 @@ constraints: any.Glob ==0.10.2,
any.unordered-containers ==0.2.20.1,
any.utf8-string ==1.0.2,
any.uuid-types ==1.0.6,
any.vault ==0.3.1.5,
any.vault ==0.3.1.6,
any.vector ==0.13.2.0,
any.vector-algorithms ==0.9.1.0,
any.vector-stream ==0.1.0.1,

View File

@ -197,3 +197,285 @@
year = {2022},
publisher = {University of Chicago Press}
}
% ── ICD Embeddings Preprint ─────────────────────────────────────────────────
@misc{cms_hrrp,
author = {{Centers for Medicare \& Medicaid Services}},
title = {Hospital Readmissions Reduction Program ({HRRP})},
url = {https://www.cms.gov/medicare/payment/prospective-payment-systems/acute-inpatient-pps/hospital-readmissions-reduction-program-hrrp}
}
@article{charlson1987,
author = {Charlson, M. E. and Pompei, P. and Ales, K. L. and MacKenzie, C. R.},
title = {A new method of classifying prognostic comorbidity in longitudinal studies: development and validation},
journal = {Journal of Chronic Diseases},
year = {1987},
volume = {40},
number = {5},
pages = {373--383}
}
@article{elixhauser1998,
author = {Elixhauser, A. and Steiner, C. and Harris, D. R. and Coffey, R. M.},
title = {Comorbidity measures for use with administrative data},
journal = {Medical Care},
year = {1998},
volume = {36},
number = {1},
pages = {8--27}
}
@article{deschepper2020,
author = {Deschepper, Mathieu and Eeckloo, Kristof and Vogelaers, Dominique and Waegeman, Willem},
title = {Using structured pathology data to predict hospital-wide mortality at admission},
journal = {PLoS One},
year = {2020},
volume = {15},
number = {6},
pages = {e0235117}
}
@article{lelay2022,
author = {Le Lay, Jonathan and Martin, Sylvain and Mosnier, Arnaud and others},
title = {Prediction of hospital readmission of multimorbid patients using machine learning models},
journal = {PLoS One},
year = {2022},
volume = {17},
number = {12},
pages = {e0279433}
}
@article{qiao2022,
author = {Qiao, Edmund M. and Deng, Jie and Kluger, Harvey M. and Yu, James B. and Gross, Cary P.},
title = {Evaluating High-Dimensional Machine Learning Models to Predict Hospital Mortality Among Older Patients With Cancer},
journal = {JCO Clinical Cancer Informatics},
year = {2022},
volume = {6},
pages = {e2100186}
}
@article{davis2022,
author = {Davis, Steve and Borah, Michael F. and Hansen, Justin and Malin, Bradley and Robinson, Jonathan and Turchin, Alexander},
title = {Effective hospital readmission prediction models using machine-learned features},
journal = {BMC Health Services Research},
year = {2022},
volume = {22},
number = {1},
pages = {1415}
}
@article{harerimana2021,
author = {Harerimana, Gaspard and Kim, Jong Wook and Jang, Beakcheol},
title = {A deep attention model to forecast the Length Of Stay and the in-hospital mortality right on admission from {ICD} codes and demographic data},
journal = {Journal of Biomedical Informatics},
year = {2021},
volume = {118},
pages = {103778}
}
@article{matsui2022,
author = {Matsui, Hiroki and Yasunaga, Hideo and Fushimi, Kiyohide and Homma, Yuichi},
title = {Development of Deep Learning Models for Predicting In-Hospital Mortality Using an Administrative Claims Database: Retrospective Cohort Study},
journal = {JMIR Medical Informatics},
year = {2022},
volume = {10},
number = {2},
pages = {e27936}
}
@article{nguyen2017,
author = {Nguyen, Phuoc and Tran, Truyen and Wickramasinghe, Nilmini and Venkatesh, Svetha},
title = {{Deepr}: A Convolutional Net for Medical Records},
journal = {IEEE Journal of Biomedical and Health Informatics},
year = {2017},
volume = {21},
number = {1},
pages = {22--30}
}
@misc{ahrq_elixhauser,
author = {{Agency for Healthcare Research and Quality}},
title = {Elixhauser Comorbidity Software Refined for {ICD-10-CM}},
url = {https://www.hcup-us.ahrq.gov/toolssoftware/comorbidityicd10/comorbidity_icd10.jsp}
}
@article{fernando2019,
author = {Fernando, Dulith T. and Berecki-Gisolf, Janneke and Newstead, Stuart and Ansari, Zul},
title = {Effect of comorbidity on injury outcomes: a review of existing indices},
journal = {Annals of Epidemiology},
year = {2019},
volume = {36},
pages = {5--14}
}
@article{quan2005,
author = {Quan, Hude and Sundararajan, Vijaya and Halfon, Patricia and others},
title = {Coding algorithms for defining comorbidities in {ICD-9-CM} and {ICD-10} administrative data},
journal = {Medical Care},
year = {2005},
volume = {43},
number = {11},
pages = {1130--1139}
}
@article{deyo1992,
author = {Deyo, Richard A. and Cherkin, Daniel C. and Ciol, Marcia A.},
title = {Adapting a clinical comorbidity index for use with {ICD-9-CM} administrative databases},
journal = {Journal of Clinical Epidemiology},
year = {1992},
volume = {45},
number = {6},
pages = {613--619}
}
@article{quan2011,
author = {Quan, Hude and Li, Bing and Couris, Chantal M. and others},
title = {Updating and validating the {Charlson} comorbidity index and score for risk adjustment in hospital discharge abstracts using data from 6 countries},
journal = {American Journal of Epidemiology},
year = {2011},
volume = {173},
number = {6},
pages = {676--682}
}
@misc{stagg2006,
author = {Stagg, Vince},
title = {{CHARLSON}: {Stata} module to calculate {Charlson} index of comorbidity},
year = {2006},
publisher = {Boston College Department of Economics}
}
@inproceedings{zaheer2017,
author = {Zaheer, Manzil and Kottur, Satwik and Ravanbakhsh, Siamak and Poczos, Barnabas and Salakhutdinov, Ruslan and Smola, Alexander},
title = {Deep Sets},
booktitle = {Advances in Neural Information Processing Systems},
year = {2017},
volume = {30}
}
@inproceedings{abadi2016,
author = {Abadi, Mart{\'i}n and Barham, Paul and Chen, Jianmin and others},
title = {{TensorFlow}: A System for Large-Scale Machine Learning},
booktitle = {Proceedings of the 12th {USENIX} Symposium on Operating Systems Design and Implementation},
year = {2016},
pages = {265--283}
}
@article{youden1950,
author = {Youden, W. J.},
title = {Index for rating diagnostic tests},
journal = {Cancer},
year = {1950},
volume = {3},
number = {1},
pages = {32--35}
}
@article{delong1988,
author = {DeLong, Elizabeth R. and DeLong, David M. and Clarke-Pearson, Daniel L.},
title = {Comparing the areas under two or more correlated receiver operating characteristic curves: a nonparametric approach},
journal = {Biometrics},
year = {1988},
volume = {44},
number = {3},
pages = {837--845}
}
@inproceedings{sundararajan2017,
author = {Sundararajan, Mukund and Taly, Ankur and Yan, Qiqi},
title = {Axiomatic Attribution for Deep Networks},
booktitle = {Proceedings of the 34th International Conference on Machine Learning},
year = {2017},
pages = {3319--3328}
}
@article{joynt2013,
author = {Joynt, Karen E. and Jha, Ashish K.},
title = {Characteristics of hospitals receiving penalties under the {Hospital Readmissions Reduction Program}},
journal = {JAMA},
year = {2013},
volume = {309},
number = {4},
pages = {342--343}
}
@article{desai2016,
author = {Desai, Nihar R. and Ross, Joseph S. and Kwon, Jin Yul and others},
title = {Association Between Hospital Penalty Status Under the {Hospital Readmission Reduction Program} and Readmission Rates for Target and Nontarget Conditions},
journal = {JAMA},
year = {2016},
volume = {316},
number = {24},
pages = {2647--2656}
}
@article{zuckerman2017,
author = {Zuckerman, Rachael B. and Sheingold, Steven H. and Orav, E. John and Ruhter, Jordan and Epstein, Arnold M.},
title = {Effect of a Hospital-wide Measure on the Readmissions Reduction Program},
journal = {New England Journal of Medicine},
year = {2017},
volume = {377},
number = {16},
pages = {1551--1558}
}
@article{obermeyer2019,
author = {Obermeyer, Ziad and Powers, Brian and Vogeli, Christine and Mullainathan, Sendhil},
title = {Dissecting racial bias in an algorithm used to manage the health of populations},
journal = {Science},
year = {2019},
volume = {366},
number = {6464},
pages = {447--453}
}
@article{kind2014,
author = {Kind, Amy J. H. and Jencks, Stephen and Brock, Jim and others},
title = {Neighborhood socioeconomic disadvantage and 30-day rehospitalization: a retrospective cohort study},
journal = {Annals of Internal Medicine},
year = {2014},
volume = {161},
number = {11},
pages = {765--774}
}
@article{joynt2011,
author = {Joynt, Karen E. and Orav, E. John and Jha, Ashish K.},
title = {Thirty-day readmission rates for {Medicare} beneficiaries by race and site of care},
journal = {JAMA},
year = {2011},
volume = {305},
number = {7},
pages = {675--681}
}
@article{hansen2011,
author = {Hansen, Luke O. and Young, Robert S. and Hinami, Keiki and Leung, Albert and Williams, Mark V.},
title = {Interventions to reduce 30-day rehospitalization: a systematic review},
journal = {Annals of Internal Medicine},
year = {2011},
volume = {155},
number = {8},
pages = {520--528}
}
@article{coleman2006,
author = {Coleman, Eric A. and Parry, Carla and Chalmers, Sandra and Min, Sung-joon},
title = {The care transitions intervention: results of a randomized controlled trial},
journal = {Archives of Internal Medicine},
year = {2006},
volume = {166},
number = {17},
pages = {1822--1828}
}
@article{rudin2019,
author = {Rudin, Cynthia},
title = {Stop Explaining Black Box Machine Learning Models for High Stakes Decisions and Use Interpretable Models Instead},
journal = {Nature Machine Intelligence},
year = {2019},
volume = {1},
number = {5},
pages = {206--215}
}

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 71 KiB

View File

@ -83,6 +83,16 @@
Shows the .csl-entry from the bibliography in-page.
============================================================ */
.popup-citation-entry {
display: block;
}
.popup-citation-entry + .popup-citation-entry {
margin-top: 0.55rem;
padding-top: 0.55rem;
border-top: 1px solid var(--border);
}
.popup-citation .csl-entry {
font-family: var(--font-sans);
font-size: 0.8rem;
@ -99,9 +109,16 @@
word-break: break-all;
}
/* Hide the [N] number badge — already shown in the inline marker */
.popup-citation .ref-num {
display: none;
font-weight: 600;
color: var(--text-faint);
margin-right: 0.35em;
font-variant-numeric: tabular-nums;
text-decoration: none;
}
.popup-citation .ref-num:hover {
color: var(--text);
}
/* Epistemic preview popup — content cloned from #epistemic; ep-* styles inherited */

View File

@ -203,13 +203,20 @@
);
}
/* 1. Citations — synchronous DOM lookup */
/* 1. Citations synchronous DOM lookup; supports multi-citation groups
via data-cite-keys (space-separated list of ref-* IDs). */
function citationContent(target) {
return new Promise(function (resolve) {
var id = (target.getAttribute('href') || '').slice(1);
var keysAttr = target.getAttribute('data-cite-keys');
var ids = keysAttr
? keysAttr.trim().split(/\s+/)
: [(target.getAttribute('href') || '').slice(1)];
var parts = ids.map(function (id) {
var entry = document.getElementById(id);
resolve(entry
? '<div class="popup-citation">' + entry.innerHTML + '</div>'
return entry ? '<div class="popup-citation-entry">' + entry.innerHTML + '</div>' : null;
}).filter(Boolean);
resolve(parts.length
? '<div class="popup-citation">' + parts.join('') + '</div>'
: null);
});
}

View File

@ -28,9 +28,6 @@ $if(search)$
<link rel="stylesheet" href="/pagefind/pagefind-ui.css">
$endif$
<script src="/js/theme.js"></script>
$if(has-citations)$
<script src="/js/citations.js" defer></script>
$endif$
$if(viz)$
<link rel="stylesheet" href="/css/viz.css">
<script src="https://cdn.jsdelivr.net/npm/vega@5" defer></script>