Thanks @raff! I've added metadata deploy support to metadata mappings for MetadataSource and MetadataTermMapping (I haven't committed or pushed it up yet thought).
I haven't added anything for MetadataSet and MetadataSetMember... not sure if I will or not, but, regardless, I have some questions on how to interact with Set and SetMembers, specifically regarding how you update a set...
Looking at how the "createExtraPatientIdTypesSetIfMissing" method works in EmrApiActivator, it looks like one can create and populate a set like this:
MetadataSet set = metadataMappingService.saveMetadataSet(new MetadataSet());
PatientIdentifierType type1 = // assume some existing type
PatientIdentifierType type2 = //
PatientIdentifierType type3 = //
But now say I want to remove "type1" and "type2" from the set (and therefore have them retired or just plain deleted) and replace them with type3. What would be the way to do this, or am I approaching the problem the wrong way?
Basically, we have code in our distribution that populates the extra patient identfier GP on startup, and I need to switch that to create the equivalent set on each startup. So this method should be idempotence if there are no changes to the set, but should update the set if there are changes.