Skip to content

Instantly share code, notes, and snippets.

@scottfisk
Created March 27, 2017 21:39
Show Gist options
  • Save scottfisk/e3b659b822c33c205bc51c732445ff92 to your computer and use it in GitHub Desktop.
Save scottfisk/e3b659b822c33c205bc51c732445ff92 to your computer and use it in GitHub Desktop.
A couple mods to Froedert's CAUTI Form
# Flip compliance on flipped audit values:
# [{
# "label": "No kinks or pinches are in tubing due to positioning?",
# "id": 33995
# }, {
# "label": "Dependent loops in tubing?",
# "id": 34841
# }, {
# "label": "Dependent loops in tubing?",
# "id": 34880
# }, {
# "label": "Dependent loops in tubing?",
# "id": 34945
# }, {
# "label": "Dependent loops in tubing?",
# "id": 34956
# }, {
# "label": "Dependent loops in tubing?",
# "id": 35400
# }, {
# "label": "Dependent loops in tubing?",
# "id": 36255
# }, {
# "label": "No dependent loops in tubing?",
# "id": 36541
# }, {
# "label": "No dependent loops in tubing?",
# "id": 36565
# }]
# Remove Green sheeting: 11948
from cpss_app.models import AuditValue, AuditForm, AuditField
from cpss_app.olaf.etl import regenerate_database
AuditValue.objects.filter(field__in=[34841,34880,34945,34956,35400,36255], compliance_value='C').update(compliance_value='D')
AuditValue.objects.filter(field__in=[34841,34880,34945,34956,35400,36255], compliance_value='N').update(compliance_value='M')
AuditValue.objects.filter(field__in=[34841,34880,34945,34956,35400,36255], compliance_value='D').update(compliance_value='N')
AuditValue.objects.filter(field__in=[34841,34880,34945,34956,35400,36255], compliance_value='M').update(compliance_value='C')
AuditField.objects.get(id=11948).delete()
regenerate_database(AuditForm.objects.get(id=961))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment