How to specify random effects in logisitc mixed effects regression with multiple observations per subject but only 1 outcome per ~50 DV measurements? I have a dataframe that looks something like this:

Each subject got somewhere between 40-120 lesions in a given procedure, and I want to know which dependent variable was associated with "injury". A subject either had post-op injury or didn't from the sum of the procedure. So 1 'injury' observation per subject, but there oculd be 100 'gsec'per subject.
egd_grade and injury were both assessed after the interventions were performed (post-surgery) whereas Randomization_Group was assigned beforehand. I'm stuck on how to specify the random effects here.
This is what I have:
glmer(factor(injury) ~ gsec + Randomization_Group + (1|subject_id), 
      family = binomial,
      data)

Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
 Family: binomial  ( logit )
Formula: factor(injury) ~ gsec + Randomization_Group + (1 | subject_id)
   Data: data

     AIC      BIC   logLik deviance df.resid 
    52.7     75.0    -22.4     44.7     1949 

Scaled residuals: 
       Min         1Q     Median         3Q        Max 
-0.0002550 -0.0002424 -0.0001830  0.0063440  0.0101318 

Random effects:
 Groups     Name        Variance Std.Dev.
 subject_id (Intercept) 9253     96.19   
Number of obs: 1953, groups:  subject_id, 44

Fixed effects:
                               Estimate Std. Error z value Pr(>|z|)    
(Intercept)                  -1.712e+01  4.738e+00  -3.614 0.000302 ***
gsec                         -2.834e-04  1.123e-02  -0.025 0.979861    
Randomization_GroupTreatment  6.054e-01  4.155e+00   0.146 0.884169    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
            (Intr) gsec  
gsec        -0.677       
Rndmztn_GrT -0.526 -0.009
optimizer (Nelder_Mead) convergence code: 0 (OK)
Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?


My question specifically pertains to the outcome metric injury. It's not like each "gsec" observation corresponded to a single yes/no injury, rather its the sum effect of every 'gsec' observation per subject/per randomization group that influence the outcome of injury yes/no.
The subject either had injury from the entire procedure or not at all.
It feels like I need to specify injury itself as a random effect but not sure how to also specify it as my outcome variable.
 A: 
boundary (singular) fit: see ?isSingular


The variable Randomization_Group seems to be a binary variable yet you are fitting random intercepts for it. This is likely to be the reason for the singular fit. Randomization_Group should be a fixed effect here.

It feels like I need to specify injury itself as a random effect but not sure how to also specify it as my outcome variable.

That wouldn't make sense at all. For one thing, it's another binary variable so fitting random intercepts for it would be wrong, but the main thing is that it's your outcome variable.

My question specifically pertains to the outcome metric injury. It's not like each "gsec" observation corresponded to a single yes/no injury, rather its the sum effect of every 'gsec' observation per subject/per randomization group that influence the outcome of injury yes/no. The subject either had injury from the entire procedure or not at all.

There's no question there, but it sounds like your concern is that the outcome is at at the subject level. There is nothing wrong with that.
