We are working on the application accessing, and possibly modifying information in patientnote table. Our assumption was that entry in this table should exist for every patient. In reality (real dental practice database), it is mainly true, but rarely there happen to be a patient for which patientnote entry is missing completely.
I wonder what triggers creation of this entry? I sometimes saw such entries that are completely empty, so it seems it's not the fact of updating the entry that creates it. Is there any "trigger" that could be reliable to know what this entry has been created?
Patientnote creation
Re: Patientnote creation
That is correct that a PatientNote entry is not created when each patient is created. Inserts to the PatientNote table occur when the PatientNotes.Refresh() method is called. This method is called in a number of locations, so there isn't necessarily a specific "trigger" that can be looked for, other than the Refresh method itself. Situations where the Refresh method is called on a Patnum without a PatientNote will result in the empty PatientNote entries you mentioned being created. A patient Merge will also always create a PatientNote entry, if one doesn't already exist, utilizing the Refresh method.
Re: Patientnote creation
Thank you! This is very helpful.