Hm. That may work for hospitalizations, but even there I don’t think it would. Because pharmacy and simple office visits don’t have any visit details. It only makes sense for complicated and extended visits.
But I am not sure what the problem is. The COST table essentially is just an extension to the other tables incurring the cost, even when there is no record of any visit.
- DRUG_EXPOSURE through the pharmacy or administration by the provider
- PROCEDURE_OCCURRENCE for whatever the procedure is
- DEVICE_EXPOSURE for the device
- VISIT_OCCURRENCE like for facility costs
- VISIT_DETAIL if there is more than on facility
Conditions, most observations, death, specimen, care sites, providers, observation periods, payers and plans - all are free or not incurred by health care.
If you want to calculate cost of something, you either follow directly from that thing to the COST table. Or, if you want all the indirect costs, you first establish everything that happened because of that entity (e.g. pain medication after a surgery), follow from there to the COST table and add it all up.