data-to-insight / csc-validator-be-903

Python-side code for the Quality LAC Data Beta frontend
https://903.datatoinsight.org
MIT License
8 stars 4 forks source link

Rules SW11aSTG2 and SW11bSTG2 #787

Open WillLP-code opened 2 months ago

WillLP-code commented 2 months ago

closes #781 closes #783

Had a quick go at these using the original SW11STG2 code, just changing what the error rows look for.

a looks for an SW_DECOM within +/- 5 days of the previous SW_DEC if the SW_DEC is more than 5 days before the end of the collection

b looks for ANY SW_DECOM if the SW_DEC is after 5 days before the end of the collection.

As always, I'm going by the logic, not the words though, so their suggested coding may not match up to what they're really looking for.