Since you're using IRIS 2022.2 I would really suggest you use %DynamicObject:

https://docs.intersystems.com/iris20222/csp/docbook/Doc.View.cls?KEY=GJS...

   set dynObject1 = ##class(%DynamicObject).%New()
   set dynObject1.dynamicLinkInfo = ##class(%DynamicObject).%New()
   set dynObject1.dynamicLinkInfo.domainUriPrefix = "link.example.com"
   set dynObject1.dynamicLinkInfo.link = "https://www.examplelink.com"
   set dynObject1.suffix = = ##class(%DynamicObject).%New()
   set dynObject1.suffix.option = "SHORT"

Another way to do it would be the following. Make TypeOfTest an array:

Class My.Test extends %Persistent
{
Property PatientName;
Property TypeOfTest as array of %String; //%Numeric maybe?
Property OrderID;
}

In the array, each element is a pair of key and value. In this case, you add a key with the name of type of test and with value the result of test. And if the "Name" is "Thyroid", then you add the rest of the elements. For example:

  do test.TypeOfTest.SetAt("10", "Thyriod")
  do test.TypefTest.SetAt("148", Tsh)

This way, for your array in SQL you will get a separate table, the name of it will be a combination of class name and property name.

You can actually write a select just to query results of the tests and then find the name of the order using the primary key (which is a link to the main table My.Test)