updated so that location code to pass to PACS is determined based on specified location attribute type