mchapman87501 / fnf_intake_forms

0 stars 0 forks source link

Generate unique Rescue ID per cat #4

Closed BlueNM1234 closed 1 year ago

BlueNM1234 commented 1 year ago

Cats can lack names and descriptions, but each cat* should have a unique Rescue ID on receipt by F&FNM.

The Rescue ID format is {type}-{date}-{code}{index} where type = 'H' for healthy, 'TM' for Treatable Medical the date is in MMDDYY format the code is 'P' for Public, otherwise the expected abbreviation for organizations. SFAS, EH, etc. the index is a unique number; it does not have to be sequential

The App needs to generate these. Should it be when the surrender is committed/submitted? Should a proposed Rescue ID be presented when a new form is presented, but only retire that Rescue ID if the form is submitted?

Do courtesy listings need a Rescue ID?

*As always, pregnant nursing mamas with their litters and motherless litters can come in groups: handle this per F&FNM direction.

mchapman87501 commented 1 year ago

Perhaps this belongs in a different issue: Rescue ID's {index} should not reset if/when the app server restarts. In the unlikely event that multiple servers are running, all should share the same {index}.