91 lines
2.8 KiB
Plaintext
91 lines
2.8 KiB
Plaintext
maintenance:
|
|
|
|
title: STD_FUNC_DOC_REPLACE_CHAR;;
|
|
mlmname: STD_FUNC_DOC_REPLACE_CHAR;;
|
|
arden: version 2.5;;
|
|
version: 18.4;;
|
|
institution: Allscripts,Standard Document called MLM;;
|
|
author: Allscripts Healthcare Solutions, Inc.;;
|
|
specialist: ;;
|
|
date: 2018-10-26;;
|
|
validation: testing;;
|
|
|
|
/* P r o p r i e t a r y N o t i c e */
|
|
/* Unpublished (c) 2013 - 2018 Allscripts Healthcare, LLC. and/or its affiliates. All Rights Reserved.
|
|
|
|
P r o p r i e t a r y N o t i c e: This software has been provided pursuant to a License Agreement, with
|
|
Allscripts Healthcare, LLC. and/or its affiliates, containing restrictions on its use. This software contains
|
|
valuable trade secrets and proprietary information of Allscripts Healthcare, LLC. and/or its affiliates and is
|
|
protected by trade secret and copyright law. This software may not be copied or distributed in any form or medium,
|
|
disclosed to any third parties, or used in any manner not provided for in said License Agreement except with prior
|
|
written authorization from Allscripts Healthcare, LLC. and/or its affiliates. Notice to U.S. Government Users:
|
|
This software is {{{SINGLE-QUOTE}}}Commercial Computer Software{{{SINGLE-QUOTE}}}.
|
|
|
|
All product names are the trademarks or registered trademarks of Allscripts Healthcare, LLC. and/or its affiliates.
|
|
*/
|
|
/* P r o p r i e t a r y N o t i c e */
|
|
|
|
library:
|
|
purpose: this function takes 3 parameters, it searches all occurences of the str
|
|
in second parameter, and replaces them with str in third parameter
|
|
;;
|
|
explanation: Called by DOC_STD_HOME_MED_SUMMARY.MLM.
|
|
|
|
;;
|
|
keywords:
|
|
;;
|
|
knowledge:
|
|
type: data-driven;;
|
|
data:
|
|
(Str, ToBeRepld, insertStr) := argument;
|
|
|
|
/* Set to true if a decision.log is needed */
|
|
log_execution_info := false;
|
|
|
|
// default to " ", if not passed
|
|
if (not exists insertStr) then
|
|
insertStr := " ";
|
|
endif;
|
|
|
|
if (called_by_editor) then
|
|
Str:= "This is a\ntest string to be\npassed";
|
|
ToBeRepld:="\n";
|
|
insertStr:=" ";
|
|
endif;
|
|
|
|
tmpStr:="";
|
|
strLen:=LENGTH OF Str;
|
|
if (exists Str and strLen > 0) then
|
|
// do some replacement
|
|
prepos:=1;
|
|
pos:= FIND ToBeRepld IN STRING Str STARTING AT prepos;
|
|
|
|
|
|
while pos > 0 and prepos < strLen do
|
|
tmp:=SUBSTRING pos-prepos CHARACTERS STARTING AT prepos FROM Str;
|
|
tmpStr:=tmpStr || tmp || insertStr;
|
|
prepos:=pos +1;
|
|
|
|
// find
|
|
pos:= FIND ToBeRepld IN STRING Str STARTING AT prepos;
|
|
enddo;
|
|
tmp:=SUBSTRING strLen-prepos+1 CHARACTERS STARTING AT prepos FROM Str;
|
|
tmpStr:=tmpStr || tmp;
|
|
endif;
|
|
/* Set to true if a decision.log is needed.*/
|
|
log_execution_info := false;
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
;;
|
|
evoke:
|
|
;;
|
|
logic:
|
|
conclude true;
|
|
;;
|
|
action:
|
|
return tmpStr;
|
|
;;
|
|
Urgency: 50;;
|
|
end:
|