How to list the retired elements by using the command?
search cancel

How to list the retired elements by using the command?

book

Article ID: 39425

calendar_today

Updated On:

Products

CA eHealth

Issue/Introduction

Question: 

Is there a way to list the retired elements using the command?

Answer: 

There are 4 possible values for nmsState:

71000 = NA (This is the default state, not retired, never un-retired)

71001 = Active (Element has been un-retired)

71002 = Deleted (You should generally not see these)

71003 = Retired (Retired)

So elements which are not retired can be Active or NA.

 

(1) To list the retired elements with basic nhListElements command:

nhListElements -where "nmsState = Retired"  //for retired

nhListElements -where "nmsState != Retired" //for not retired

 

(2)Use sql statements to query DB:

$NH_HOME/bin/sys/nhisql "select name, n.nms_state from nh_element;" > elements.txt

//71000 is polled and 71003 is retired

Example:

$NH_HOME/bin/sys/nhisql "select name, n.nms_state from nh_element where nms_state like 71003;”

$NH_HOME/bin/sys/nhisql "select name, n.nms_state from nh_element where nms_state like 71000;”

Environment

Release: LHDEVC99000-6.3-eHealth-Live Health Upgrade Elements
Component: