-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[26790] Such-Funktion Sortierfunktion Designe angepasst und Einstellu…
…ng (#406)
- Loading branch information
Showing
43 changed files
with
1,187 additions
and
561 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
56 changes: 44 additions & 12 deletions
56
...ch.elexis.mednet.webapi.core/src/ch/elexis/mednet/webapi/core/constants/ApiConstants.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 |
---|---|---|
@@ -1,20 +1,52 @@ | ||
package ch.elexis.mednet.webapi.core.constants; | ||
|
||
import java.util.Optional; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import ch.elexis.core.services.IConfigService; | ||
import ch.elexis.core.utils.OsgiServiceUtil; | ||
|
||
public class ApiConstants { | ||
|
||
// API Base URL | ||
public static final String BASE_API_URL = "https://demo.mednet.swiss/web/api/v1/external"; | ||
public static final String BASE_URI = "https://demo.mednetpatient.swiss/idsrv"; | ||
public static final String BASE_REDERICT_URI = "https://tools.medelexis.ch/mednet/ac"; | ||
public static final String BASE_REDERICT_URI_OBTAIN = "https://tools.medelexis.ch/mednet/ac-obtain/"; | ||
private static final Logger logger = LoggerFactory.getLogger(ApiConstants.class); | ||
|
||
// Specific API Endpoints | ||
public static final String CUSTOMERS_URL = BASE_API_URL + "/customers?includeDetails=true"; | ||
public static final String PROVIDERS_URL = BASE_API_URL + "/providers?customerId=%d&includeDetails=true"; | ||
public static final String FORMS_URL = BASE_API_URL + "/forms?customerId=%d&providerId=%d"; | ||
public static final String SUBMITTED_FORMS_URL = BASE_API_URL + "/submitted-forms?customerId=%d"; | ||
public static final String PATIENTS_URL = BASE_API_URL + "/patients"; | ||
public static String getBaseApiUrl() { | ||
Optional<IConfigService> configService = OsgiServiceUtil.getServiceWait(IConfigService.class, 5000); | ||
if (configService.isPresent()) { | ||
String mode = configService.get().getActiveUserContact(PreferenceConstants.MEDNET_MODE, "DEMO"); | ||
|
||
if ("PRODUKTIV".equals(mode)) { | ||
return "https://www.mednet.swiss/web/api/v1/external"; | ||
} else { | ||
return "https://demo.mednet.swiss/web/api/v1/external"; | ||
} | ||
} else { | ||
logger.error("Error when retrieving the base API URL from the preferences: {}"); | ||
} | ||
return "https://demo.mednet.swiss/web/api/v1/external"; | ||
} | ||
|
||
} | ||
public static String getBaseUri() { | ||
|
||
Optional<IConfigService> configService = OsgiServiceUtil.getServiceWait(IConfigService.class, 5000); | ||
if (configService.isPresent()) { | ||
String mode = configService.get().getActiveUserContact(PreferenceConstants.MEDNET_MODE, "DEMO"); | ||
if ("PRODUKTIV".equals(mode)) { | ||
return "https://www.mednet.swiss/idsrv"; | ||
} else { | ||
return "https://demo.mednetpatient.swiss/idsrv"; | ||
} | ||
} | ||
return "https://demo.mednetpatient.swiss/idsrv"; | ||
} | ||
|
||
public static final String BASE_REDERICT_URI = "https://tools.medelexis.ch/mednet/ac"; | ||
public static final String BASE_REDERICT_URI_OBTAIN = "https://tools.medelexis.ch/mednet/ac-obtain/"; | ||
public static final String CUSTOMERS_URL = "/customers?includeDetails=true"; | ||
public static final String PROVIDERS_URL = "/providers?customerId=%d&includeDetails=true"; | ||
public static final String FORMS_URL = "/forms?customerId=%d&providerId=%d"; | ||
public static final String SUBMITTED_FORMS_URL = "/submitted-forms?customerId=%d"; | ||
public static final String PATIENTS_URL = "/patients"; | ||
} |
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
7 changes: 7 additions & 0 deletions
7
....elexis.mednet.webapi.core/src/ch/elexis/mednet/webapi/core/constants/StateConstants.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,7 @@ | ||
package ch.elexis.mednet.webapi.core.constants; | ||
|
||
public class StateConstants { | ||
public static final String CUSTOMER = "CUSTOMER"; | ||
public static final String PROVIDER = "PROVIDER"; | ||
public static final String FORM = "FORM"; | ||
} |
47 changes: 0 additions & 47 deletions
47
...exis.mednet.webapi.core/src/ch/elexis/mednet/webapi/core/constants/TransientCategory.java
This file was deleted.
Oops, something went wrong.
32 changes: 28 additions & 4 deletions
32
...ch.elexis.mednet.webapi.core/src/ch/elexis/mednet/webapi/core/constants/URLConstants.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 |
---|---|---|
@@ -1,11 +1,35 @@ | ||
package ch.elexis.mednet.webapi.core.constants; | ||
|
||
import java.util.Optional; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import ch.elexis.core.services.IConfigService; | ||
import ch.elexis.core.utils.OsgiServiceUtil; | ||
|
||
public class URLConstants { | ||
private static final Logger logger = LoggerFactory.getLogger(URLConstants.class); | ||
|
||
public static String getBaseApiUrl() { | ||
Optional<IConfigService> configService = OsgiServiceUtil.getServiceWait(IConfigService.class, 5000); | ||
if (configService.isPresent()) { | ||
String mode = configService.get().getActiveUserContact(PreferenceConstants.MEDNET_MODE, "DEMO"); | ||
|
||
if ("PRODUKTIV".equals(mode)) { | ||
return "https://www.mednet.swiss"; | ||
} else { | ||
return "https://demo.mednet.swiss"; | ||
} | ||
} else { | ||
logger.error("Error when retrieving the base API URL from the preferences: {}"); | ||
} | ||
return "https://demo.mednet.swiss"; | ||
} | ||
|
||
public static final String URL_PATIENTS = "https://demo.mednet.swiss/DoctorUser/patients"; | ||
public static final String URL_TASKS = "https://demo.mednet.swiss/DoctorUser/tasks"; | ||
public static final String URL_DOCUMENTS = "https://demo.mednet.swiss/DoctorUser/documents"; | ||
public static final String URL_THERAPY = "https://demo.mednet.swiss/DoctorUser/chronic-diseases/chronic-diseases-list"; | ||
public static final String URL_PATIENTS = "/DoctorUser/patients"; | ||
public static final String URL_TASKS = "/DoctorUser/tasks"; | ||
public static final String URL_DOCUMENTS = "/DoctorUser/documents"; | ||
public static final String URL_THERAPY = "/DoctorUser/chronic-diseases/chronic-diseases-list"; | ||
|
||
} |
Oops, something went wrong.