Skip to content

Commit

Permalink
Avoid dots in generated UUIDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zestyping committed Aug 27, 2015
1 parent da9c865 commit cb45e30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ public static Concept getOrderExecutedConcept() {
"Order executed",
// The OpenMRS "uuid" field is misnamed; OpenMRS uses the field for
// arbitrary string IDs unrelated to RFC 4122. Therefore, to prevent
// collisions, UUIDs specific to this module are prefixed "buendia.".
"buendia.concept.order_executed",
// collisions, UUIDs specific to this module are prefixed "buendia-".
"buendia-concept-order_executed",
"N/A",
"Finding");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public class OrderResource implements Listable, Searchable, Retrievable, Creatab
static final User CREATOR = new User(1); // fake value
static final RequestLogger logger = RequestLogger.LOGGER;
static Log log = LogFactory.getLog(OrderResource.class);
static final String FREE_TEXT_ORDER_UUID = "buendia.concept.free_text_order";
static final String FREE_TEXT_ORDER_UUID = "buendia-concept-free_text_order";

final PatientService patientService;
final OrderService orderService;
Expand Down
4 changes: 2 additions & 2 deletions tools/profile_apply
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def apply(tabs):

def apply_charts(rows):
chart_layout = get_or_insert(
'encounter_type', name='buendia.chart_layout',
'encounter_type', name='buendia-chart_layout',
description='Buendia: patient chart layout definition')
for chart_rows in split_by_title(rows):
put_chart(chart_rows)
Expand Down Expand Up @@ -277,7 +277,7 @@ def apply(tabs):
adult_return = db.get('encounter_type_id', name='ADULTRETURN')

title = rows[0]['title']
uuid = 'buendia.form.' + re.sub('[\W_]+', '_', title.lower()).strip('_')
uuid = 'buendia-form-' + re.sub('[\W_]+', '_', title.lower()).strip('_')
form_id = db.get('form_id', uuid=uuid)
if not form_id:
form_id = odb.insert('form', name=title, version='1',
Expand Down

0 comments on commit cb45e30

Please sign in to comment.