Disclose law enforcement incident information, except redact incident narrative for any user who is not a law enforcement officer. Also, do not disclose incidents considered as open investigations unless the user is an officer at my agency. Add an obligation on the user when disclosing any of my LE information that the information must be destroyed within 30 days.
[This rulesheet could be identified by a composite key that included a primary custodian of “http://stakeholders/myveryownpolicedept.com” or both this and a problem space of “http://somefederalagency.gov/document/LEincidentreport.xsd”.]

alias
	replace:
		incident
	with:
		“http://registry/semantics/government/justice/law-enforcement/documentation/incident-report”

alias
	replace:
		narrative
	with:
		“http://registry/semantics/government/justice/law-enforcement/documentation/incident-narrative”

alias
	replace:
		open-investigation
	with:
		“http://registry/semantics/government/justice/law-enforcement/process-status/open-investigation”

alias
	replace:
		my-officers
	with:
		“ou=officers, ou=myveryownpolicedept, ou=groups, o=northernregionalchiefsfederation”

alias
	replace:
		law-enforcement-officer
	with:
		“http://registry/semantics/government-agent/law-enforcement-officer”

alias
	replace:
		law-enforcement-documentation
	with:
		“http://govregistry/federal-semantics/law-enforcement/documentation”

default-rule
	id:
		1
	apply-outcomes:
		mask

rule
	id:
		2
	apply-outcomes:
		disclose
	for-content:
		* all-true
			* present-item contains-something-that-means open-investigation
			* any-true
				* present-item means incident
				* present-item means narrative
	for-conditions:
		* user's-organizational-roles contain-something-with-value my-officers

rule
	id:
		3
	apply-outcomes:
		disclose
	for-content:
		* all-true
			* present-item doesn't-contain-something-that-means open-investigation
			* present-item means incident
			* present-item doesn't-mean narrative
			# Note the incident could CONTAIN a narrative. So, we need rule 4 below to cover just the narrative portion.
			# We want to redact the narrative as opposed to considering only incidents that contain no narrative.
	for-conditions:
		* all-conditions

rule
	id:
		4
	apply-outcomes:
		mask
	for-content:
		* present-item means narrative
	for-conditions:
		* user's-roles don't-contain-something-that-means law-enforcement-officer

# Rule 5 would be superfluous due to the inheritance of rule 3's disclosure, as long as the narrative were contained within the incident.
# Since such containment is dependent on a given implementation of message schema, declaring rule 5 lessens this rulesheet's dependency
# on that schema.
rule
	id:
		5
	apply-outcomes:
		disclose
	for-content:
		* all-true
			* present-item means narrative
			* present-item doesn't-contain-something-that-means open-investigation
	for-conditions:
		* user's-roles contain-something-that-means law-enforcement-officer

rule
	id:
		6
	apply-outcomes:
		obligation-on-disclosure
			text:
				You are obliged to destroy this information within 30 days as it is not an official copy of the record.
	for-content:
		* present-item has-similar-meaning-with law-enforcement-documentation
	for-conditions:
		* all-conditions