Missing Local ID: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{TOC right}}
{{TOC right}}
{{Note | All ID are important to be filled in. ''Form ID'' is important for the DEF's Reconcilation tab and I recommend that to update that one as the last one.}}
{{Note | All ID are important to be filled in. ''Form ID'' is important for the DEF's Reconcilation tab and I recommend that to update ''Form ID'' after you have have checked the items' ID.
There is a PostgreSQL version of this page '''[[Missing Local ID PGSQL | too]]'''.}}


==Missing Local ID items ==__NOEDITSECTION__  
==Missing Local ID items items ==__NOEDITSECTION__  
[[Image:Missing local id.png|475px|center]]
[[Image:Missing local id.png|475px|center]]
<div align="center">
<div align="center">
Line 10: Line 11:
Start with checking the items and the infoversions. If they are missing a local ID then I strongly recommend to set one which will be very helpful if you need to populate ''Form ID''.
Start with checking the items and the infoversions. If they are missing a local ID then I strongly recommend to set one which will be very helpful if you need to populate ''Form ID''.


=== Accident ===__NOEDITSECTION__  
=== Missing ID - Accident ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 30: Line 31:
</pre>
</pre>


=== Hazard ===__NOEDITSECTION__  
=== Missing ID - Hazard ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 50: Line 51:
</pre>
</pre>


=== Hazard Reduction ===__NOEDITSECTION__  
=== Missing ID - Hazard Reduction ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 70: Line 71:
</pre>
</pre>


=== Location ===__NOEDITSECTION__  
=== Missing ID - Location ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 90: Line 91:
</pre>
</pre>


=== MRE ===__NOEDITSECTION__  
=== Missing ID - MRE ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 110: Line 111:
</pre>
</pre>


=== QM ===__NOEDITSECTION__  
=== Missing ID - QM ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 130: Line 131:
</pre>
</pre>


=== Victim ===__NOEDITSECTION__  
=== Missing ID - Victim ===__NOEDITSECTION__  
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.
If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or '''both''' that are missing the Local ID.


Line 150: Line 151:
</pre>
</pre>


=== Example update query ===__NOEDITSECTION__  
=== Missing Local ID items - Example update query ===__NOEDITSECTION__  
<pre>
<pre>
update hazardinfoversion
update hazardinfoversion
Line 163: Line 164:


== Missing Local ID fieldreport ==__NOEDITSECTION__  
== Missing Local ID fieldreport ==__NOEDITSECTION__  
[[Image:Missing local id2.png|900px|center]]
<div align="center">
'' How it should NOT look like''
</div>
If you get output here you '''NEED''' to take action. The easiest solution to populate the ''Form ID'' for DEF is to use the local ID from the infoversion which you have now populated with updating the ones that were missing with the queries above.
If you get output here you '''NEED''' to take action. The easiest solution to populate the ''Form ID'' for DEF is to use the local ID from the infoversion which you have now populated with updating the ones that were missing with the queries above.


Line 173: Line 179:
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue,
fieldreportdesc.fieldreportname
FROM
FROM
fieldreport
fieldreport
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
Inner Join fieldreportdesc ON fieldreport.fieldreportdesc_guid = fieldreportdesc.fieldreportdesc_guid
WHERE
WHERE
fieldreport.fieldreport_localid is null or length(trim(fieldreport.fieldreport_localid)) = 0
fieldreport.fieldreport_localid IS NULL or length(trim(fieldreport.fieldreport_localid)) = 0
ORDER BY
imsmaenum.enumvalue ASC,
fieldreportdesc.fieldreportname ASC
</pre>
</pre>


If you have any output here you need to take action. The queries below help you to identify for which item(s) the rows in the table ''fieldreport'' need to be updated.
If you have any output here you need to take action. The queries below help you to identify for which item(s) the rows in the table ''fieldreport'' need to be updated and if you have any data that you could use.


=== Accident ===__NOEDITSECTION__  
=== Missing ID fieldreport - Accident ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 204: Line 217:
</pre>
</pre>


=== Hazard ===__NOEDITSECTION__  
=== Missing ID fieldreport - Hazard ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 226: Line 239:
</pre>
</pre>


=== Hazard Reduction ===__NOEDITSECTION__  
=== Missing ID fieldreport - Hazard Reduction ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 248: Line 261:
</pre>
</pre>


=== Location ===__NOEDITSECTION__  
=== Missing ID fieldreport - Location ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 269: Line 282:
</pre>
</pre>


=== MRE ===__NOEDITSECTION__  
=== Missing ID fieldreport - MRE ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 290: Line 303:
</pre>
</pre>


=== QM ===__NOEDITSECTION__
=== Missing ID fieldreport - QM ===__NOEDITSECTION__
<pre>
<pre>
SELECT
SELECT
Line 311: Line 324:
</pre>  
</pre>  


=== Victim ===__NOEDITSECTION__  
=== Missing ID fieldreport - Victim ===__NOEDITSECTION__  
<pre>
<pre>
SELECT
SELECT
Line 332: Line 345:
</pre>
</pre>


=== Example update query ===__NOEDITSECTION__  
=== Missing ID fieldreport - Example update query ===__NOEDITSECTION__  
[[Image:Missing local id3.png|875px|center]]
 
<pre>
<pre>
update fieldreport
update fieldreport
Line 349: Line 364:
<pre>
<pre>
SELECT
SELECT
gazetteer.gazetteer_localid
gazetteer.gazetteer_localid,
gazetteer.gazetteername,
gazetteerlevel.`level`
FROM
FROM
gazetteer
gazetteer
INNER JOIN gazetteerlevel ON gazetteer.gazlevel_guid = gazetteerlevel.gazlevel_guid
WHERE
WHERE
gazetteer_localid IS NULL OR length(trim(gazetteer_localid)) = 0
gazetteer_localid IS NULL OR length(trim(gazetteer_localid)) = 0
ORDER BY
gazetteer.gazetteername ASC
</pre>
</pre>


Line 359: Line 379:
<pre>
<pre>
SELECT
SELECT
organisation.org_localid
organisation.org_localid,
organisation.orgname,
organisation.parentorg_guid
FROM
FROM
organisation
organisation
WHERE
WHERE
org_localid IS NULL OR length(trim(org_localid)) = 0
org_localid IS NULL OR length(trim(org_localid)) = 0
ORDER BY
organisation.orgname ASC
</pre>
</pre>


Line 369: Line 393:
<pre>
<pre>
SELECT
SELECT
place.place_localid
place.place_localid,
place.placename
FROM
FROM
place
place
WHERE
WHERE
place_localid IS NULL OR length(trim(place_localid)) = 0
place_localid IS NULL OR length(trim(place_localid)) = 0
ORDER BY
place.placename ASC
</pre>
</pre>


Line 379: Line 406:
<pre>
<pre>
SELECT
SELECT
task.localid
task.localid,
task.`name`
FROM
FROM
task
task
WHERE
WHERE
task.localid IS NULL or length(trim(task.localid))=0
task.localid IS NULL or length(trim(task.localid))=0
ORDER BY
task.`name` ASC
</pre>
</pre>


Line 389: Line 419:
<pre>
<pre>
SELECT
SELECT
work_item.localid
work_item.localid,
work_item.`name`
FROM
FROM
work_item
work_item
WHERE
WHERE
work_item.localid IS NULL OR length(trim(work_item.localid)) = 0
work_item.localid IS NULL OR length(trim(work_item.localid)) = 0
ORDER BY
work_item.`name` ASC
</pre>
</pre>
=== Example update query ===__NOEDITSECTION__


{{NavBox Upgrade}}
{{NavBox Upgrade}}
[[Category:NoPublic]]
[[Category:NoPublic]]
[[Category:SQL Queries]]
[[Category:SQL Queries]]

Latest revision as of 21:49, 12 November 2016

All ID are important to be filled in. Form ID is important for the DEF's Reconcilation tab and I recommend that to update Form ID after you have have checked the items' ID.

There is a PostgreSQL version of this page too.

Missing Local ID items items

How it should NOT look like

Start with checking the items and the infoversions. If they are missing a local ID then I strongly recommend to set one which will be very helpful if you need to populate Form ID.

Missing ID - Accident

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
accident.accident_localid AS Acc_ID,
accidentinfoversion.accident_localid
FROM
accident
Inner Join accidentinfoversion ON accident.accident_guid = accidentinfoversion.accident_guid
WHERE
(accident.accident_localid IS NULL  OR
accidentinfoversion.accident_localid IS NULL OR 
length(trim(accident.accident_localid)) = 0  OR
length(trim(accidentinfoversion.accident_localid)) = 0)  AND
accidentinfoversion.link_only =  '0'
ORDER BY
accident.accident_localid ASC

Missing ID - Hazard

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
hazard.hazard_localid AS Haz_ID,
hazardinfoversion.hazard_localid
FROM
hazardinfoversion
Inner Join hazard ON hazardinfoversion.hazard_guid = hazard.hazard_guid
WHERE
hazardinfoversion.link_only =  '0' AND
(hazardinfoversion.hazard_localid IS NULL  OR
hazard.hazard_localid IS NULL OR
length(trim(hazardinfoversion.hazard_localid))= 0  OR
length(trim(hazard.hazard_localid)) = 0 )
ORDER BY
hazard.hazard_localid ASC

Missing ID - Hazard Reduction

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
hazreduc.hazreduc_localid AS HR_ID,
hazreducinfoversion.hazreduc_localid
FROM
hazreducinfoversion
Inner Join hazreduc ON hazreducinfoversion.hazreduc_guid = hazreduc.hazreduc_guid
WHERE
(hazreducinfoversion.hazreduc_localid IS NULL  OR
hazreduc.hazreduc_localid IS NULL OR
length(trim(hazreducinfoversion.hazreduc_localid)) = 0  OR
length(trim(hazreduc.hazreduc_localid)) = 0 )  AND
hazreducinfoversion.link_only =  '0'
ORDER BY
hazreduc.hazreduc_localid ASC

Missing ID - Location

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
location.location_localid AS Loc_ID,
locationinfoversion.location_localid
FROM
locationinfoversion
Inner Join location ON locationinfoversion.location_guid = location.location_guid
WHERE
(locationinfoversion.location_localid IS NULL  OR
location.location_localid IS NULL OR 
length(trim(locationinfoversion.location_localid)) = 0  OR
length(trim(location.location_localid)) = 0)  AND
locationinfoversion.link_only =  '0'
ORDER BY
location.location_localid ASC

Missing ID - MRE

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
mre.mre_localid AS MRE_ID,
mreinfoversion.mre_localid
FROM
mreinfoversion
Inner Join mre ON mreinfoversion.mre_guid = mre.mre_guid
WHERE
(mreinfoversion.mre_localid IS NULL  OR
mre.mre_localid IS NULL OR 
length(trim(mreinfoversion.mre_localid)) = 0  OR
length(trim(mre.mre_localid)) = 0)  AND
mreinfoversion.link_only =  '0'
ORDER BY
mre.mre_localid ASC

Missing ID - QM

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
qa.qa_localid AS QM_ID,
qainfoversion.qa_localid
FROM
qainfoversion
Inner Join qa ON qainfoversion.qa_guid = qa.qa_guid
WHERE
(qainfoversion.qa_localid IS NULL  OR
qa.qa_localid IS NULL OR
length(trim(qainfoversion.qa_localid)) = 0  OR
length(trim(qa.qa_localid))= 0)  AND
qainfoversion.link_only =  '0'
ORDER BY
qa.qa_localid ASC

Missing ID - Victim

If you get output here you need to take action. From the result set you can figure out a solution depending on if it is the item, the infoversion or both that are missing the Local ID.

SELECT
victim.victim_localid AS Vic_ID,
victiminfoversion.victim_localid
FROM
victiminfoversion
Inner Join victim ON victiminfoversion.victim_guid = victim.victim_guid
WHERE
(victiminfoversion.victim_localid IS NULL  OR
victim.victim_localid IS NULL OR
length(trim(victiminfoversion.victim_localid))= 0  OR
length(trim(victim.victim_localid))= 0)  AND
victiminfoversion.link_only =  '0'
ORDER BY
victim.victim_localid ASC

Missing Local ID items - Example update query

update hazardinfoversion
Inner Join hazard ON hazardinfoversion.hazard_guid = hazard.hazard_guid
SET
hazardinfoversion.hazard_localid = hazard.hazard_localid 
WHERE
hazardinfoversion.link_only =  '0' AND
hazardinfoversion.hazard_localid IS NULL  and
hazard.hazard_localid IS NOT NULL 

Missing Local ID fieldreport

How it should NOT look like

If you get output here you NEED to take action. The easiest solution to populate the Form ID for DEF is to use the local ID from the infoversion which you have now populated with updating the ones that were missing with the queries above.

SELECT
fieldreport.fieldreport_localid,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
imsmaenum.enumvalue,
fieldreportdesc.fieldreportname
FROM
fieldreport
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
Inner Join fieldreportdesc ON fieldreport.fieldreportdesc_guid = fieldreportdesc.fieldreportdesc_guid
WHERE
fieldreport.fieldreport_localid IS NULL or length(trim(fieldreport.fieldreport_localid)) = 0
ORDER BY
imsmaenum.enumvalue ASC,
fieldreportdesc.fieldreportname ASC

If you have any output here you need to take action. The queries below help you to identify for which item(s) the rows in the table fieldreport need to be updated and if you have any data that you could use.

Missing ID fieldreport - Accident

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
accidentinfoversion.accident_localid
FROM
fieldreport
Inner Join accidentinfoversion ON fieldreport.fieldreport_guid = accidentinfoversion.fieldreport_guid
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL  or length(trim(fieldreport.fieldreport_localid)) = 0 )
AND
accidentinfoversion.link_only =  '0'

Missing ID fieldreport - Hazard

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
hazardinfoversion.hazard_localid
FROM
fieldreport
Inner Join hazardinfoversion ON fieldreport.fieldreport_guid = hazardinfoversion.fieldreport_guid
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL  OR length(trim(fieldreport.fieldreport_localid)) = 0)
AND
hazardinfoversion.link_only =  '0'

Missing ID fieldreport - Hazard Reduction

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
hazreducinfoversion.hazreduc_localid
FROM
fieldreport
Inner Join hazreducinfoversion ON hazreducinfoversion.fieldreport_guid = fieldreport.fieldreport_guid
Inner Join imsmaenum ON imsmaenum.imsmaenum_guid = fieldreport.workbenchstatusenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL  or length(trim(fieldreport.fieldreport_localid)) = 0) AND
hazreducinfoversion.link_only =  '0' AND
hazreducinfoversion.hazreduc_localid IS NOT NULL

Missing ID fieldreport - Location

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
locationinfoversion.location_localid
FROM
fieldreport
Inner Join locationinfoversion ON locationinfoversion.fieldreport_guid = fieldreport.fieldreport_guid
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL or length(trim(fieldreport.fieldreport_localid)) = 0 ) AND
locationinfoversion.link_only =  '0'

Missing ID fieldreport - MRE

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
mreinfoversion.mre_localid
FROM
fieldreport
Inner Join mreinfoversion ON mreinfoversion.fieldreport_guid = fieldreport.fieldreport_guid
Inner Join imsmaenum ON imsmaenum.imsmaenum_guid = fieldreport.workbenchstatusenum_guid
WHERE
( fieldreport.fieldreport_localid is null or length(trim(fieldreport.fieldreport_localid)) = 0) AND
mreinfoversion.link_only = '0'

Missing ID fieldreport - QM

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
qainfoversion.qa_localid
FROM
fieldreport
Inner Join qainfoversion ON qainfoversion.fieldreport_guid = fieldreport.fieldreport_guid
Inner Join imsmaenum ON imsmaenum.imsmaenum_guid = fieldreport.workbenchstatusenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL  or length(trim(fieldreport.fieldreport_localid)) = 0) AND
qainfoversion.link_only =  '0'

Missing ID fieldreport - Victim

SELECT
fieldreport.fieldreport_localid,
imsmaenum.enumvalue,
fieldreport.dateofreport AS `Date of Information`,
fieldreport.reportreceiveddate AS `Data Entry Date`,
fieldreport.reportcompleteddate AS `Submitted Date`,
fieldreport.reportverifieddate AS `Approved Date`,
fieldreport.dataenterer AS `Data enterer`,
fieldreport.verifiedby AS `Approved by`,
victiminfoversion.victim_localid
FROM
fieldreport
Inner Join victiminfoversion ON fieldreport.fieldreport_guid = victiminfoversion.fieldreport_guid
Inner Join imsmaenum ON fieldreport.workbenchstatusenum_guid = imsmaenum.imsmaenum_guid
WHERE
(fieldreport.fieldreport_localid IS NULL  or length(trim(fieldreport.fieldreport_localid)) = 0) AND
victiminfoversion.link_only =  '0'

Missing ID fieldreport - Example update query

update fieldreport
Inner Join hazardinfoversion ON hazardinfoversion.fieldreport_guid = fieldreport.fieldreport_guid
SET
fieldreport.fieldreport_localid = concat('FR-', trim(hazardinfoversion.hazard_localid))
WHERE
(fieldreport.fieldreport_localid is null or length(trim(fieldreport.fieldreport_localid)) = 0) and
hazardinfoversion.link_only =  '0' AND
hazardinfoversion.hazard_localid IS NOT NULL 

Missing Local ID Auxiliary data and Task

Country structure

In 5.x the Country Structure ID was not visible in the editor and therefore many countries will have blank here. To have a proper ID will facilitate Country structure updates which happens regularly.

SELECT
gazetteer.gazetteer_localid,
gazetteer.gazetteername,
gazetteerlevel.`level`
FROM
gazetteer
INNER JOIN gazetteerlevel ON gazetteer.gazlevel_guid = gazetteerlevel.gazlevel_guid
WHERE
gazetteer_localid IS NULL OR length(trim(gazetteer_localid)) = 0
ORDER BY
gazetteer.gazetteername ASC

Organisation

SELECT
organisation.org_localid,
organisation.orgname,
organisation.parentorg_guid
FROM
organisation
WHERE
org_localid IS NULL OR length(trim(org_localid)) = 0
ORDER BY
organisation.orgname ASC

Place

SELECT
place.place_localid,
place.placename
FROM
place
WHERE
place_localid IS NULL OR length(trim(place_localid)) = 0
ORDER BY
place.placename ASC

Task

SELECT
task.localid,
task.`name`
FROM
task
WHERE
task.localid IS NULL or length(trim(task.localid))=0
ORDER BY
task.`name` ASC

Work item

SELECT
work_item.localid,
work_item.`name`
FROM
work_item
WHERE
work_item.localid IS NULL OR length(trim(work_item.localid)) = 0
ORDER BY
work_item.`name` ASC

{{#switch:|subgroup|child=|none=|#default=

}}{{#if:|}}{{#if:Upgrade Process|<td style="text-align:left;border-left-width:2px;border-left-style:solid;|{{#if:|}}}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:missing local id

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group2}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list2}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:missing local id

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}{{#if:|{{{group3}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list3}}}

}}{{#if:|{{#if:|{{{group4}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list4}}}

}}{{#if:|{{#if:|{{{group5}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list5}}}

}}{{#if:|{{#if:|{{{group6}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list6}}}

}}{{#if:|{{#if:|{{{group7}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list7}}}

}}{{#if:|{{#if:|{{{group8}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list8}}}

}}{{#if:|{{#if:|{{{group9}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list9}}}

}}{{#if:|{{#if:|{{{group10}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list10}}}

}}{{#if:|{{#if:|{{{group11}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list11}}}

}}{{#if:|{{#if:|{{{group12}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list12}}}

}}{{#if:|{{#if:|{{{group13}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list13}}}

}}{{#if:|{{#if:|{{{group14}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list14}}}

}}{{#if:|{{#if:|{{{group15}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list15}}}

}}{{#if:|{{#if:|{{{group16}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list16}}}

}}{{#if:|{{#if:|{{{group17}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list17}}}

}}{{#if:|{{#if:|{{{group18}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list18}}}

}}{{#if:|{{#if:|{{{group19}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list19}}}

}}{{#if:|{{#if:|{{{group20}}}<td style="text-align:left;border-left-width:2px;border-left-style:solid;|

{{{list20}}}

}}{{#if:|{{#if:IMSMA Hub{{#switch:{{#if:|{{{border}}}|child}}|subgroup|child=|none=|#default=

}}{{#ifeq:|Template|{{#ifeq:{{#if:|{{{border}}}|child}}|child||{{#ifeq:{{#if:|{{{border}}}|child}}|subgroup||{{#switch:missing local id

|doc
|sandbox
|testcases =
|#default = {{#switch:
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}|}}

{{{below}}}

}}{{#switch:|subgroup|child=

|none=|#default=}}{{#ifeq:|Template|{{#ifeq:|child||{{#ifeq:|subgroup||{{#switch:missing local id
|doc
|sandbox
|testcases =
|#default = {{#switch:hlist
 |plainlist
 |hlist
 |hlist hnum
 |hlist vcard
 |vcard hlist = 
 |#default = 
 }}
}}

}}}}}}