Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
baylor2016
Creator
Creator

How to specify the inherited state in alternate state?

Hi,

I use the following script to get the count for patients in inherited state by specifying the alternate state (NOT).

=COUNT(DISTINCT
{<
PAT_ID = p({<ICD9_CODE2 = p(ICD9_CODE2)>}PAT_ID)
-
p({NOT<[ICD9_CODE2]=p({NOT}ICD9_CODE2)>} PAT_ID)
>}
PAT_ID)

Now I need to get the count in the alternate state (NOT) by using the following. The 'NOT' is not necessary here since it is in NOT state. My question is how to specify the inherited state in the following script.

=COUNT(DISTINCT
{<
PAT_ID = p({<ICD9_CODE2 = p(ICD9_CODE2)>}PAT_ID) //Inherited state
*
p({NOT<[ICD9_CODE2]=p({NOT}ICD9_CODE2)>} PAT_ID)
>}
PAT_ID)

Thanks

1 Solution

Accepted Solutions
sunny_talwar

May be this

=COUNT(DISTINCT

{<

PAT_ID = p({$<ICD9_CODE2 = p({$}ICD9_CODE2)>}PAT_ID) //Inherited state

*

p({NOT<[ICD9_CODE2]=p({NOT}ICD9_CODE2)>} PAT_ID)

>}

PAT_ID)

View solution in original post

2 Replies
sunny_talwar

May be this

=COUNT(DISTINCT

{<

PAT_ID = p({$<ICD9_CODE2 = p({$}ICD9_CODE2)>}PAT_ID) //Inherited state

*

p({NOT<[ICD9_CODE2]=p({NOT}ICD9_CODE2)>} PAT_ID)

>}

PAT_ID)

baylor2016
Creator
Creator
Author

Perfect!