I'm sorry! I meant to attach some example code. Thank you for sharing that link. That is really helpful.
Here is some example code. For Fx_claim and Trauma_claim, 0=no claim and 1=1 claim.
Patient 1 has 2 fragility fractures (Fx_claim=1 and Trauma_claim=0 for the same day) and 1 non-fragility fracture (Fx_claim=1 and Trauma_claim=1 for same day);
Patient 2 has a non-fragility fracture (Fx_claim=1 and Trauma_claim=1 for the same day);
Patient 3 has no fracture or trauma code (both=0).
patid fst_dt Fx_claim Trauma_claim
1 2016-01-01 0 0
1 2016-02-03 1 0
1 2016-02-05 0 0
1 2016-12-01 0 0
1 2016-07-05 1 0
1 2016-07-17 1 1
1 2016-09-02 0 0
2 2016-02-04 0 0
2 2016-05-21 1 1
2 2016-10-25 0 0
2 2016-11-11 0 0
3 2016-02-19 0 0
3 2016-04-26 0 0
3 2016-04-28 0 0
3 2016-06-12 0 0