Inheritance of measures by declarable records from parent

Question for @matt_bitzesty please.
I’m informed that the source data XML uses an inheritance structure. For example, declarable commodity 03 06 11 10 10 lacks its own data, and it is assumed it inherits this data form its non-declarable parent 03 06 11 10.

However, when I query the JSON service, it looks like you have done the heavy lifting already, and show the inherited measures against the child:

While the parent is not found at either

Could you confirm that you’ve applied the inheritance as we suspect? If so, could you point to the file on github from which we can understand your logic?

Many thanks

Hi @Daniel.Clarke.WiseTech

Yes we display the inherited measures on the child commodity codes.

It’s not very pretty logic, basically traversing back up the tree to find all the com codes then finding all the measures for these codes, then deduplicating them.

The parent code would not be a commodity code but a heading or a subheading (which doesn’t have its own page, it’s displayed on the heading page) so the URL structure would change to

We don’t display the subheadings as a page because you cannot declare against them.

This is only needed if you are importing the HMRC CDS bulk dataset, in terms of the code here is where we do that:
and then the uptree for a commodity is here:

1 Like