That is dependent upon a number of factors.
Generally, the surgery (if performed) is coded (by the ASC). The diagnoses would reflect the patient's reason for surgery is Primary and any other factors (including that of admission) as secondary. The 72 hour rule applies primarily to when/if the patient receives services from the same hospital (as subsequent admission) during that time. To my knowledge that does not affect services provided elsewhere.
The hospital, on the other hand, would bill as Principal the reason for the admission and all services falling within the admission to discharge time frame under the DRG.
Hope this helps.