-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fhir-obs-category-maps
- Loading branch information
Showing
97 changed files
with
2,558 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
version: 1 | ||
build: | ||
bash_commands: "mvn clean install -P Validator" | ||
deploy: | ||
# Do not deploy via OCD3. Initializer publishing is done via GitHub Actions now. | ||
# Do skip OCD3 build. Initializer reference build is made through GitHub Actions. | ||
bash_commands: "exit 0" | ||
deploy: | ||
# Do not deploy via OCD3. Initializer publishing is done via GitHub Actions. | ||
bash_commands: "exit 0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
api-2.3/src/main/java/org/openmrs/module/initializer/api/queues/QueueCsvParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package org.openmrs.module.initializer.api.queues; | ||
|
||
import org.apache.commons.lang3.StringUtils; | ||
import org.openmrs.annotation.OpenmrsProfile; | ||
import org.openmrs.module.initializer.Domain; | ||
import org.openmrs.module.initializer.api.BaseLineProcessor; | ||
import org.openmrs.module.initializer.api.CsvLine; | ||
import org.openmrs.module.initializer.api.CsvParser; | ||
import org.openmrs.module.queue.api.QueueService; | ||
import org.openmrs.module.queue.model.Queue; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Qualifier; | ||
|
||
@OpenmrsProfile(modules = { "queue:*" }) | ||
public class QueueCsvParser extends CsvParser<Queue, BaseLineProcessor<Queue>> { | ||
|
||
private final QueueService queueService; | ||
|
||
@Autowired | ||
public QueueCsvParser(@Qualifier("queue.QueueService") QueueService queueService, QueueLineProcessor processor) { | ||
super(processor); | ||
this.queueService = queueService; | ||
} | ||
|
||
@Override | ||
public Domain getDomain() { | ||
return Domain.QUEUES; | ||
} | ||
|
||
@Override | ||
public Queue bootstrap(CsvLine line) throws IllegalArgumentException { | ||
String uuid = line.getUuid(); | ||
Queue queue = queueService.getQueueByUuid(uuid).orElse(new Queue()); | ||
if (StringUtils.isNotBlank(uuid)) { | ||
queue.setUuid(uuid); | ||
} | ||
return queue; | ||
} | ||
|
||
@Override | ||
public Queue save(Queue instance) { | ||
return queueService.createQueue(instance); | ||
} | ||
} |
Oops, something went wrong.