I'm using UV10.1 in PICK flavor and having trouble "linking" one
TABLECLASSMAP to another to output a field from related file. I set up the
XMAP using the XMLDB tool and everything works fine, no errors, except there
is no output from TABLECLASSMAP "M2" and "M3" in the example below. By no
output, I mean that the tags don't even print. Everything else is being
output to XML exactly the way it is specified.
If someone can point me in the right direction, explain how <TableMap> works
and the relationship to <RelatedTable> or anything else, I'd greatly
appreciate it.
Thanks a bunch -
-Scott Teixeira
For the example, PHYSICIAN_CODE is in the PATIENTS file in attribute 1,
which is the key to the PHYSICIANS file (@ID), and the physician first name
and last name are in attributes 1 and 2 in the PHYSICIANS file.
Diagnosis codes are multivalued and in attribute 2 of the PATIENTS file,
which are the keys for the DIAGNOSIS.CODES file (@ID). The diagnosis
description is in attribute 1 of the DIAGNOSIS.FILE.
<?xml version="1.0" ?>
<!-- DOCTYPE U2XMAP SYSTEM "U2XMAP.DTD" -->
<U2XMAP version="1.0" Name="PATIENT.map" XSD="PATIENT.xsd">
<OPTIONS>
<EmptyString IsNull="ON" />
<DateFormat Format="DYMD[4,2,2]" />
<ExistRecord Action="Default"/>
</OPTIONS>
<!-- Table/Class map PATIENTS_Patient -->
<TABLECLASSMAP MapName="M1" StartNode="Patients/Patient"
TableName="PATIENTS">
<ColumnMap Node="PatientName/FirstName" Column="FIRST_NAME"/>
<ColumnMap Node="PatientName/LastName" Column="LAST_NAME"/>
<ColumnMap Node="PatientName/MiddleName" Column="MIDDLE_INITIAL"/>
<ColumnMap Node="Location/Room" Column="ROOM"/>
<ColumnMap Node="Location/Bed" Column="BED"/>
<ColumnMap Node="PatientVisit/Prescriber/ID"
Column="PHYSICIAN_CODE"/>
<TableMap Node="PatientVisit/Prescriber/Name" MapName="M2"/>
<ColumnMap Node="Diagnoses/Diagnosis,Code" Column="DIAGNOSIS_CODE"/>
<TableMap Node="Diagnoses/Diagnosis" MapName="M3"/>
</TABLECLASSMAP>
<!-- Table/Class map PHYSICIANS_Prescriber -->
<TABLECLASSMAP MapName="M2" StartNode="PatientVisit/Prescriber/Name"
TableName="PHYSICIANS">
<ColumnMap Node="FirstName" Column="FIRST_NAME"/>
<ColumnMap Node="LastName" Column="LAST_NAME"/>
</TABLECLASSMAP>
<!-- Table/Class map DIAGNOSIS.CODES_Description -->
<TABLECLASSMAP MapName="M3" StartNode="Diagnoses/Diagnosis"
TableName="DIAGNOSIS.CODES">
<ColumnMap Node="Description" Column="DIAGNOSIS_DESCRIPTION"/>
</TABLECLASSMAP>
<RelatedTable>
<MapParentKey TableName="PATIENTS" Column="PHYSICIAN_CODE"
KeyGenerate="NO"/>
<MapChildKey TableName="PHYSICIANS" Column="@ID"/>
</RelatedTable>
<RelatedTable>
<MapParentKey TableName="PATIENTS" Column="DIAGNOSIS_CODE"
KeyGenerate="NO"/>
<MapChildKey TableName="DIAGNOSIS.CODES" Column="@ID"/>
</RelatedTable>
</U2XMAP>
-----------------------------------------
-- NOTICE -- This e-mail message is confidential, intended only for
the named recipient(s) above and may contain information that is
privileged or exempt from disclosure under applicable law. If you
have received this message in error, or are not the named
recipient(s), please immediately notify the sender and delete this
e-mail message from your computer. Thank you.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/