Dear Laetitia,
unfortunately I could not find any documentation on this rule, at least not on the P21 website.
So, the rule, and its implementation seems not to be very transparent.
What I can however say as one of the developers of the standard is the following:
When you define a standard for the codelists, as you did, you also need to reference this standard on each of the “CodeList” elements, using the “CodeListOID” attribute.
The Define-XML v.2.1 specification (you should read it) is clear: in the context of a regulatory submission (that is what P21 is about I suppose), you either need to provide “def:StandardOID” (when the codelist is taken or derived from CDISC-CT), or the attribute “def:IsNonStandard” with value “Yes” when it is a “sponsor-defined” codelist.
So, did you add “def:StandardOID” or “def:IsNonStandard” on each “CodeList”?
I don’t claim adding these will go the error go away, as it is not clear how DD0138 works or implemented, but you could surely have a look, at best in the define.xml itself, e.g. using simple NotePad++.
For the OID of the “Study” and of “MetaDataVersion”, one should know that OIDs are just identifiers, NOT meant to have a meaning. Your software (what are you using?) is however trying to generate OIDs with a meaning, and just takes … something (?) that comes from your input (Excel???).
Better would be that the software generates OIDs e.g. as UUIDs (Universally unique identifier - Wikipedia) like “1ef62f72-c9eb-4c4f-9701-13994384d5fd”, OR generated from the true information that you provide like the real Study ID.
You also mention “sheet ‘Dataset’ in define specifications” but there essentially is no such thing: the define.xml itself is “the specification”. For the (Excel?) sheet one could maybe speak about a “template”, but surely not about “specification”, i.e. one cannot have a “specification of a specification”.
Some people from the CDISC Define-XML development team, so people with the real knowledge, have developed excellent Define-XML validation tools. So you may also have a look at these.
Attached a snapshot of the Define-XML v.2.1 specification. But anyone working with Define-XML should definitely download that specification from the CDISC website.