Forum Discussion

jshu's avatar
jshu
Occasional Contributor
9 years ago
Solved

assertion

I'm using SoapUI Pro to validate xml response for ICD10 medical codes in data driving test, the data source is an Excel spreadsheet, a typical example of 2 rows of data look like:

 

ICD10CM, Diabetes, E10.10, "Diagnosis, Active: Gestational Diabetes"

ICD10CM, Kidney, I12.0, "Diagnosis, Active: Hypertensive Chronic Kidney Disease"

....

 

The last column is the description of an ICD10 code, sometimes it can be very long and full of jargons that only doctors understand, and the spreadsheet becomes ugly, is there a simple way to define a variable (say Diabetes_Diagnosis_Desc) to hold this string value for description and then use this variable in the spreadsheet for assertion please? In that case the spreadsheet looks neat and easier to understand, like below:

 

ICD10CM, Diabetes, E10.10, Diabetes_Diagnosis_Desc

ICD10CM, Kidney, I12.0, Kidney_Diagnosis_Desc

...

 

Diabetes_Diagnosis_Desc = "Diagnosis, Active: Gestational Diabetes"

Kidney_Diagnosis_Desc = "Diagnosis, Active: Hypertensive Chronic Kidney Disease"

 

So if a row reads:   ICD10CM, Diabetes, E10.10, "Diagnosis, Active: Gestational Diabetes"

it'll pass, otherwise if it's like:    ICD10CM, Diabetes, E10.10, "Diagnosis, Inactive: Gestational Diabetes"

it'll fail

 

If it's doable, could you please give some example for coding?

 

Thanks a lot for help

 

Jerry

 

 

 

  • You should be able to do something like that. And maintain the description in a property file, as you mentioned, as key, value pair.


    In the data driven test, load the property file.
    For the last column, instead of taking value, get the value from properties file using the value of last column as key. Then assign the value for description.
    You should be able to get examples on the net to load properties and get value of certain property key.

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    You should be able to do something like that. And maintain the description in a property file, as you mentioned, as key, value pair.


    In the data driven test, load the property file.
    For the last column, instead of taking value, get the value from properties file using the value of last column as key. Then assign the value for description.
    You should be able to get examples on the net to load properties and get value of certain property key.

    • jshu's avatar
      jshu
      Occasional Contributor

      Thanks again for the great help!

       

      Jerry