I do not understand the requirement when you say - rows that not have parent code type and parent code value

For the sample you posted all records have parent code type and value