Update the detail schema builder to cope with our new schema architecture.
Update the detail schema builder to cope with our new schema architecture.

refs openhealthcare/elcid#239

khchine5/opal,khchine5/opal,khchine5/opal